mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-04-05 17:37:51 +08:00
30 lines
464 B
C#
30 lines
464 B
C#
using System;
|
|
|
|
namespace CPF.Mac.CoreFoundation
|
|
{
|
|
public struct CFIndex
|
|
{
|
|
private IntPtr value;
|
|
|
|
private CFIndex(IntPtr value)
|
|
{
|
|
this.value = value;
|
|
}
|
|
|
|
public static implicit operator int(CFIndex index)
|
|
{
|
|
return index.value.ToInt32();
|
|
}
|
|
|
|
public static implicit operator CFIndex(int value)
|
|
{
|
|
return new CFIndex(new IntPtr(value));
|
|
}
|
|
|
|
public static implicit operator long(CFIndex index)
|
|
{
|
|
return index.value.ToInt64();
|
|
}
|
|
}
|
|
}
|