public X11KeyboardHook() { if (Interlocked.Increment(ref count) == 1) { Gtk.Application.Init(); Application.AddMessageFilter(new Filter()); } Console.WriteLine (Marshal.SizeOf(typeof(IntPtr))); window = new Gdk.Window(gdk_get_default_root_window()); window.AddFilter(FilterFunction); }
public X11Hotkey(Gdk.Key key, Gdk.ModifierType modifiers) { this.key = key; this.modifiers = modifiers; Gdk.Window rootWin = Gdk.Global.DefaultRootWindow; IntPtr xDisplay = GetXDisplay(rootWin); this.keycode = XKeysymToKeycode(xDisplay, (int)this.key); rootWin.AddFilter(new Gdk.FilterFunc(FilterFunction)); }
public X11KeyboardHook() { if (Interlocked.Increment(ref count) == 1) { Gtk.Application.Init(); Application.AddMessageFilter(new Filter()); } Console.WriteLine(Marshal.SizeOf(typeof(IntPtr))); window = new Gdk.Window(gdk_get_default_root_window()); window.AddFilter(FilterFunction); }