public OSXHIDInterface()
        {
            __drivers = new List <IDriver>();

            __ports = new string[20];



            HandleHIDDeviceAdded   = HidDeviceAdded;
            HandleHIDDeviceRemoved = HidDeviceRemoved;
            HandleDeviceRemoved    = DeviceRemoved;

            CFDictionaryRef[] dictionaries;



            dictionaries = new CFDictionaryRef[3];

            //create 3 search patterns by Joystick,GamePad and MulitAxisController

            // base.typeRef = CFLibrary.CFDictionaryCreate(IntPtr.Zero,keyz,values,keys.Length,ref kcall,ref vcall);



            dictionaries[0] = CreateDeviceMatchingDictionary((uint)Native.HIDPage.GenericDesktop, (uint)Native.HIDUsageGD.Joystick);

            dictionaries[1] = CreateDeviceMatchingDictionary((uint)Native.HIDPage.GenericDesktop, (uint)Native.HIDUsageGD.GamePad);

            dictionaries[2] = CreateDeviceMatchingDictionary((uint)Native.HIDPage.GenericDesktop, (uint)Native.HIDUsageGD.MultiAxisController);



            DeviceTypes = new Native.CFArray(dictionaries);


            //create Hid manager
            hidmanager = Native.IOHIDManagerCreate(IntPtr.Zero, (int)Native.IOHIDOptionsType.kIOHIDOptionsTypeNone);
        }