Example #1
0
        static SKManagedStream()
        {
            fRead        = new read_delegate(ReadInternal);
            fPeek        = new peek_delegate(PeekInternal);
            fIsAtEnd     = new isAtEnd_delegate(IsAtEndInternal);
            fRewind      = new rewind_delegate(RewindInternal);
            fGetPosition = new getPosition_delegate(GetPositionInternal);
            fSeek        = new seek_delegate(SeekInternal);
            fMove        = new move_delegate(MoveInternal);
            fGetLength   = new getLength_delegate(GetLengthInternal);
            fCreateNew   = new createNew_delegate(CreateNewInternal);
            fDestroy     = new destroy_delegate(DestroyInternal);

            SkiaApi.sk_managedstream_set_delegates(
                Marshal.GetFunctionPointerForDelegate(fRead),
                Marshal.GetFunctionPointerForDelegate(fPeek),
                Marshal.GetFunctionPointerForDelegate(fIsAtEnd),
                Marshal.GetFunctionPointerForDelegate(fRewind),
                Marshal.GetFunctionPointerForDelegate(fGetPosition),
                Marshal.GetFunctionPointerForDelegate(fSeek),
                Marshal.GetFunctionPointerForDelegate(fMove),
                Marshal.GetFunctionPointerForDelegate(fGetLength),
                Marshal.GetFunctionPointerForDelegate(fCreateNew),
                Marshal.GetFunctionPointerForDelegate(fDestroy));
        }
Example #2
0
		static SKManagedStream()
		{
			fRead = new read_delegate(ReadInternal);
			fPeek = new peek_delegate(PeekInternal);
			fIsAtEnd = new isAtEnd_delegate(IsAtEndInternal);
			fRewind = new rewind_delegate(RewindInternal);
			fGetPosition = new getPosition_delegate(GetPositionInternal);
			fSeek = new seek_delegate(SeekInternal);
			fMove = new move_delegate(MoveInternal);
			fGetLength = new getLength_delegate(GetLengthInternal);
			fCreateNew = new createNew_delegate(CreateNewInternal);
			fDestroy = new destroy_delegate(DestroyInternal);

			SkiaApi.sk_managedstream_set_delegates(
				Marshal.GetFunctionPointerForDelegate(fRead), 
				Marshal.GetFunctionPointerForDelegate(fPeek), 
				Marshal.GetFunctionPointerForDelegate(fIsAtEnd), 
				Marshal.GetFunctionPointerForDelegate(fRewind),
				Marshal.GetFunctionPointerForDelegate(fGetPosition),
				Marshal.GetFunctionPointerForDelegate(fSeek),
				Marshal.GetFunctionPointerForDelegate(fMove),
				Marshal.GetFunctionPointerForDelegate(fGetLength),
				Marshal.GetFunctionPointerForDelegate(fCreateNew),
				Marshal.GetFunctionPointerForDelegate(fDestroy));
		}