Ejemplo n.º 1
0
        private static IntPtr Noesis_RenderDevice_CreateGL_()
        {
            IntPtr cPtr = Noesis_RenderDevice_CreateGL();

            Error.Check();
            return(cPtr);
        }
Ejemplo n.º 2
0
        private static IntPtr Noesis_RenderDevice_CreateD3D11_(IntPtr deviceContext, bool sRGB)
        {
            IntPtr cPtr = Noesis_RenderDevice_CreateD3D11(deviceContext, sRGB);

            Error.Check();
            return(cPtr);
        }
        static IntPtr Noesis_View_Create_(HandleRef content)
        {
            IntPtr result = Noesis_View_Create(content);

            Error.Check();
            return(result);
        }
Ejemplo n.º 4
0
        static IntPtr Noesis_LoadXaml_(string xaml)
        {
            IntPtr result = Noesis_LoadXaml(xaml);

            Error.Check();
            return(result);
        }
 static void Noesis_UpdateTextureSource_(IntPtr cPtr, IntPtr texture, int width, int height, int numMipMaps)
 {
     Noesis_UpdateTextureSource(cPtr, texture, width, height, numMipMaps);
     #if UNITY_EDITOR
     Error.Check();
     #endif
 }
        private static IntPtr Noesis_InstantiateExtend_(IntPtr nativeType)
        {
            IntPtr result = Noesis_InstantiateExtend(nativeType);

            Error.Check();
            return(result);
        }
        static IntPtr Noesis_CreateTextureSource_(IntPtr texture, int width, int height, int numMipMaps, bool isInverted)
        {
            IntPtr ret = Noesis_CreateTextureSource(texture, width, height, numMipMaps, isInverted);

            Error.Check();
            return(ret);
        }
        private static IntPtr Noesis_GetResourceKeyType_(IntPtr nativeType)
        {
            IntPtr result = Noesis_GetResourceKeyType(nativeType);

            Error.Check();
            return(result);
        }
        public BuildToolKernel(string platform)
        {
            library_  = new Library(UnityEngine.Application.dataPath + "/Editor/NoesisGUI/BuildTool/Noesis");
            platform_ = platform.ToLower();

            try
            {
                RegisterFunctions(library_);
                Error.RegisterFunctions(library_);
                Log.RegisterFunctions(library_);
                _Extend.RegisterFunctions(library_);
                _NoesisGUI_PINVOKE.RegisterFunctions(library_);

                registerLogCallback_(OnLog);
                _Extend.RegisterCallbacks();

                initKernel_(platform_, UnityEngine.Application.dataPath, UnityEngine.Application.streamingAssetsPath);
                Error.Check();

                Log.Info(String.Format("Host is Unity v{0}", UnityEngine.Application.unityVersion));

                _Extend.Initialized(true);
                _Extend.RegisterNativeTypes();
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }
 // Build all XAMLs and dependencies
 public void BuildAll()
 {
     Log.Info(String.Format("BUILD {0}", platform_));
     buildAll_();
     Error.Check();
     RefreshComponents();
 }
        static int Noesis_CreateRenderer(IntPtr root)
        {
            int ret = _createRenderer(root);

            Error.Check();
            return(ret);
        }
        static bool Noesis_Renderer_UpdateRenderTree_(HandleRef renderer)
        {
            bool ret = Noesis_Renderer_UpdateRenderTree(renderer);

            Error.Check();
            return(ret);
        }
        static bool Noesis_Renderer_NeedsOffscreen_(HandleRef renderer)
        {
            bool ret = Noesis_Renderer_NeedsOffscreen(renderer);

            Error.Check();
            return(ret);
        }
        static bool Noesis_HitTest(IntPtr root, float x, float y)
        {
            bool ret = _hitTest(root, x, y);

            Error.Check();
            return(ret);
        }
        static IntPtr Noesis_GetRenderCallback()
        {
            IntPtr ret = _getRenderCallback();

            Error.Check();
            return(ret);
        }
Ejemplo n.º 16
0
 private static void Noesis_LaunchPropertyChangedEvent_(IntPtr nativeType, IntPtr cPtr, string propertyName)
 {
     Noesis_LaunchPropertyChangedEvent(nativeType, cPtr, propertyName);
     #if UNITY_EDITOR || NOESIS_API
     Error.Check();
     #endif
 }
Ejemplo n.º 17
0
 private static void Noesis_LaunchCollectionChangedEvent_(IntPtr nativeType, IntPtr cPtr, int action,
                                                          IntPtr newItem, IntPtr oldItem, int newIndex, int oldIndex)
 {
     Noesis_LaunchCollectionChangedEvent(nativeType, cPtr, action, newItem, oldItem, newIndex, oldIndex);
     #if UNITY_EDITOR || NOESIS_API
     Error.Check();
     #endif
 }
Ejemplo n.º 18
0
 private static void Noesis_FillExtendType_(ref ExtendTypeData typeData,
                                            int numProps, IntPtr propsData)
 {
     Noesis_FillExtendType(ref typeData, numProps, propsData);
     #if UNITY_EDITOR || NOESIS_API
     Error.Check();
     #endif
 }
Ejemplo n.º 19
0
        private static IntPtr Noesis_CreatePropertyMetadata_(HandleRef defaultValue,
                                                             DelegateInvokePropertyChangedCallback invokePropertyChangedCallback)
        {
            IntPtr result = Noesis_CreatePropertyMetadata(defaultValue, invokePropertyChangedCallback);

            Error.Check();
            return(result);
        }
Ejemplo n.º 20
0
 private static void Noesis_OverrideMetadata_(IntPtr classType, IntPtr dependencyProperty,
                                              IntPtr propertyMetadata)
 {
     Noesis_OverrideMetadata(classType, dependencyProperty, propertyMetadata);
     #if UNITY_EDITOR || NOESIS_API
     Error.Check();
     #endif
 }
        private static IntPtr Noesis_RegisterEnumType_(string typeName,
                                                       int numEnums, IntPtr enumsData)
        {
            IntPtr result = Noesis_RegisterEnumType(typeName, numEnums, enumsData);

            Error.Check();
            return(result);
        }
        static IntPtr Noesis_CreateTextureSource_(IntPtr texture, int width, int height, int numMipMaps)
        {
            IntPtr ret = Noesis_CreateTextureSource(texture, width, height, numMipMaps);

            #if UNITY_EDITOR
            Error.Check();
            #endif
            return(ret);
        }
Ejemplo n.º 23
0
        private static IntPtr Noesis_InstantiateExtend_(IntPtr nativeType)
        {
            IntPtr result = Noesis_InstantiateExtend(nativeType);

            #if UNITY_EDITOR || NOESIS_API
            Error.Check();
            #endif
            return(result);
        }
Ejemplo n.º 24
0
        private static Texture WrapGL(IntPtr nativePointer, int width, int height, int numMipMaps,
                                      int format, bool isInverted)
        {
            IntPtr texPtr = Noesis_WrapGLTexture(nativePointer, width, height, numMipMaps,
                                                 format, isInverted);

            Error.Check();
            return(new Texture(texPtr, true));
        }
 static void Noesis_RegisterTextureSourceCallbacks_(
     UnregisterTextureSourceCallback unregisterTextureSourceCallback,
     UpdateTextureSourcesCallback updateTextureSourcesCallback)
 {
     Noesis_RegisterTextureSourceCallbacks(unregisterTextureSourceCallback, updateTextureSourcesCallback);
     #if UNITY_EDITOR
     Error.Check();
     #endif
 }
Ejemplo n.º 26
0
        private static IntPtr Noesis_GetResourceKeyType_(IntPtr nativeType)
        {
            IntPtr result = Noesis_GetResourceKeyType(nativeType);

            #if UNITY_EDITOR || NOESIS_API
            Error.Check();
            #endif
            return(result);
        }
        private static IntPtr Noesis_RegisterDependencyProperty_(IntPtr classType,
                                                                 string propertyName, IntPtr propertyType, IntPtr typeMetadata)
        {
            IntPtr result = Noesis_RegisterDependencyProperty(classType, propertyName, propertyType,
                                                              typeMetadata);

            Error.Check();
            return(result);
        }
Ejemplo n.º 28
0
        private static IntPtr Noesis_RegisterDependencyProperty_(IntPtr classType,
                                                                 string propertyName, IntPtr propertyType, IntPtr propertyMetadata)
        {
            IntPtr result = Noesis_RegisterDependencyProperty(classType, propertyName, propertyType, propertyMetadata);

            #if UNITY_EDITOR || NOESIS_API
            Error.Check();
            #endif
            return(result);
        }
Ejemplo n.º 29
0
        private static IntPtr Noesis_RegisterEnumType_(string typeName,
                                                       int numEnums, IntPtr enumsData)
        {
            IntPtr result = Noesis_RegisterEnumType(typeName, numEnums, enumsData);

            #if UNITY_EDITOR || NOESIS_API
            Error.Check();
            #endif
            return(result);
        }
        private static IntPtr Noesis_CreatePropertyMetadata_(HandleRef defaultValue,
                                                             DelegateInvokePropertyChangedCallback invokePropertyChangedCallback)
        {
            IntPtr result = Noesis_CreatePropertyMetadata(defaultValue, invokePropertyChangedCallback);

            #if UNITY_EDITOR || NOESIS_API
            Error.Check();
            #endif
            return(result);
        }