-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
317 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright (C) 2024 vuelto-org | ||
* | ||
* This file is part of the Vuelto project, licensed under the Vuelto License V1. | ||
* Primary License: GNU GPLv3 or later (see <https://www.gnu.org/licenses/>). | ||
* If unmaintained, this software defaults to the MIT License as per Vuelto License V1, | ||
* at which point the copyright no longer applies. | ||
* | ||
* Distributed WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
*/ | ||
|
||
package trita | ||
|
||
import ( | ||
"reflect" | ||
) | ||
|
||
const Func = reflect.Func | ||
|
||
type TritaType struct { | ||
Kind any | ||
NumArguments int | ||
ReflectValue reflect.Value | ||
} | ||
|
||
func NewTritaValue(Variable any) *TritaType { | ||
varoutput := reflect.ValueOf(Variable) | ||
return &TritaType{ | ||
Kind: varoutput.Kind(), | ||
NumArguments: varoutput.Type().NumIn(), | ||
ReflectValue: varoutput, | ||
} | ||
} | ||
|
||
func (trita *TritaType) TypeArgument(ArgumentNum int) any { | ||
return trita.ReflectValue.Type().In(ArgumentNum) | ||
} | ||
|
||
func YourType(Types any) any { | ||
return reflect.TypeOf(Types) | ||
} | ||
|
||
func (trita *TritaType) Call(args ...any) []reflect.Value { | ||
argumentsList := make([]reflect.Value, len(args)) | ||
for i, arg := range args { | ||
argumentsList[i] = reflect.ValueOf(arg) | ||
} | ||
return trita.ReflectValue.Call(argumentsList) | ||
} | ||
|
||
func (trita *TritaType) HasReturn() bool { | ||
return trita.ReflectValue.Type().NumOut() > 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
/* | ||
* Copyright (C) 2024 vuelto-org | ||
* | ||
* This file is part of the Vuelto project, licensed under the Vuelto License V1. | ||
* Primary License: GNU GPLv3 or later (see <https://www.gnu.org/licenses/>). | ||
* If unmaintained, this software defaults to the MIT License as per Vuelto License V1, | ||
* at which point the copyright no longer applies. | ||
* | ||
* Distributed WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
*/ | ||
|
||
package cocoa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
/* | ||
* Copyright (C) 2024 vuelto-org | ||
* | ||
* This file is part of the Vuelto project, licensed under the Vuelto License V1. | ||
* Primary License: GNU GPLv3 or later (see <https://www.gnu.org/licenses/>). | ||
* If unmaintained, this software defaults to the MIT License as per Vuelto License V1, | ||
* at which point the copyright no longer applies. | ||
* | ||
* Distributed WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
*/ | ||
|
||
package wayland |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
/* | ||
* Copyright (C) 2024 vuelto-org | ||
* | ||
* This file is part of the Vuelto project, licensed under the Vuelto License V1. | ||
* Primary License: GNU GPLv3 or later (see <https://www.gnu.org/licenses/>). | ||
* If unmaintained, this software defaults to the MIT License as per Vuelto License V1, | ||
* at which point the copyright no longer applies. | ||
* | ||
* Distributed WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
*/ | ||
|
||
package win32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.