sip.unwrapinstance works for python -> c++ pointer conversion
This commit is contained in:
parent
3bd590cc91
commit
8a9dac53c0
|
@ -23,12 +23,12 @@
|
|||
# Imports (ctypes)
|
||||
|
||||
from ctypes import (
|
||||
c_bool, c_char_p, c_double, c_int, c_uint, c_uint32, c_void_p, cast,
|
||||
c_char_p, c_void_p, cast,
|
||||
cdll, Structure,
|
||||
CFUNCTYPE, POINTER
|
||||
POINTER
|
||||
)
|
||||
|
||||
from sip import voidptr
|
||||
from sip import unwrapinstance
|
||||
|
||||
# ------------------------------------------------------------------------------------------------------------
|
||||
# Imports (Custom)
|
||||
|
@ -69,11 +69,9 @@ class CarlaFrontendLib():
|
|||
# --------------------------------------------------------------------------------------------------------
|
||||
|
||||
def createAndExecAboutJuceW(self, parent):
|
||||
# FIXME cast(c_void_p, voidptr(parent))
|
||||
self.lib.carla_frontend_createAndExecAboutJuceW(None)
|
||||
self.lib.carla_frontend_createAndExecAboutJuceW(unwrapinstance(parent))
|
||||
|
||||
def createAndExecJackApplicationW(self, parent, projectFilename):
|
||||
# FIXME cast(c_void_p, voidptr(parent))
|
||||
return structToDictOrNull(self.lib.carla_frontend_createAndExecJackApplicationW(None, projectFilename.encode("utf-8")))
|
||||
return structToDictOrNull(self.lib.carla_frontend_createAndExecJackApplicationW(unwrapinstance(parent), projectFilename.encode("utf-8")))
|
||||
|
||||
# ------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -31,7 +31,7 @@ from carla_shared import gCarla
|
|||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# Imports (Local)
|
||||
|
||||
from .aboutjucedialog_ui import Ui_AboutJuceDialog
|
||||
from aboutjucedialog_ui import Ui_AboutJuceDialog
|
||||
|
||||
# ------------------------------------------------------------------------------------------------------------
|
||||
# About JUCE dialog
|
||||
|
@ -67,8 +67,11 @@ if __name__ == '__main__':
|
|||
from PyQt5.QtWidgets import QApplication
|
||||
# pylint: enable=ungrouped-imports
|
||||
|
||||
# from carla_utils import CarlaUtils
|
||||
# gCarla.utils = CarlaUtils(os.path.dirname(__file__) + "/../../../bin/libcarla_utils.dylib")
|
||||
|
||||
_app = QApplication(sys.argv)
|
||||
_gui = AboutJuceW(None, "")
|
||||
_gui = AboutJuceW(None)
|
||||
_gui.exec_()
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -32,7 +32,7 @@ from utils import QSafeSettings
|
|||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# Imports (Local)
|
||||
|
||||
from .jackappdialog_ui import Ui_JackAppDialog
|
||||
from jackappdialog_ui import Ui_JackAppDialog
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# Imports (API)
|
||||
|
|
Loading…
Reference in New Issue