コード例 #1
0
ファイル: X11KeyboardHook.cs プロジェクト: agaldino/dojotimer
 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);
 }
コード例 #2
0
    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));
    }
コード例 #3
0
 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);
 }