Example #1
0
        public static uint AddKeyEventListener(Atk.KeySnoopFunc listener)
        {
            AtkSharp.KeySnoopFuncWrapper listener_wrapper = new AtkSharp.KeySnoopFuncWrapper(listener);
            uint raw_ret = atk_add_key_event_listener(listener_wrapper.NativeDelegate, IntPtr.Zero);
            uint ret     = raw_ret;

            return(ret);
        }
 public KeySnoopFuncWrapper(Atk.KeySnoopFunc managed)
 {
     this.managed = managed;
     if (managed != null)
     {
         NativeDelegate = new KeySnoopFuncNative(NativeCallback);
     }
 }
Example #3
0
        internal static uint AddKeyEventListener(
            Atk.KeySnoopFunc listener)
        {
            KeyListenerInfo info = new KeyListenerInfo();

            lock (listenerListSync)
            {
                info.Id = 0;
                while (KeyListenerList.ContainsKey(info.Id))
                {
                    info.Id++;
                }
                info.listener = listener;
                KeyListenerList.Add(info.Id, info);
            }
            return(info.Id);
        }
		public KeySnoopFuncWrapper (Atk.KeySnoopFunc managed)
		{
			this.managed = managed;
			if (managed != null)
				NativeDelegate = new KeySnoopFuncNative (NativeCallback);
		}