Exemple #1
0
 private void Init()
 {
     Events = EventMask.PointerMotionMask |
       EventMask.ButtonPressMask |
       EventMask.ButtonReleaseMask;
     _imContext = new Gtk.IMMulticontext();
     _imContext.Commit += ImContext_Commit;
 }
Exemple #2
0
 private void Init()
 {
     Events = EventMask.PointerMotionMask |
              EventMask.ButtonPressMask |
              EventMask.ButtonReleaseMask;
     _imContext         = new Gtk.IMMulticontext();
     _imContext.Commit += ImContext_Commit;
 }
Exemple #3
0
 private void Init()
 {
     Events = EventMask.PointerMotionMask |
       EventMask.ButtonPressMask |
       EventMask.ButtonReleaseMask;
     _windowHandle = new PlatformHandle(Handle, "GtkWindow");
     _imContext = new Gtk.IMMulticontext();
     _imContext.Commit += ImContext_Commit;
 }
Exemple #4
0
 private void Init()
 {
     Events = EventMask.PointerMotionMask |
              EventMask.ButtonPressMask |
              EventMask.ButtonReleaseMask;
     _windowHandle      = new PlatformHandle(Handle, "GtkWindow");
     _imContext         = new Gtk.IMMulticontext();
     _imContext.Commit += ImContext_Commit;
 }
Exemple #5
0
 private void Init()
 {
     Events = EventMask.PointerMotionMask |
       EventMask.ButtonPressMask |
       EventMask.ButtonReleaseMask;
     _imContext = new Gtk.IMMulticontext();
     _imContext.Commit += ImContext_Commit;
     DoubleBuffered = false;
     Realize();
 }
Exemple #6
0
 private void Init()
 {
     Events = EventMask.PointerMotionMask |
              EventMask.ButtonPressMask |
              EventMask.ButtonReleaseMask;
     _imContext         = new Gtk.IMMulticontext();
     _imContext.Commit += ImContext_Commit;
     DoubleBuffered     = false;
     Realize();
 }
 void Init()
 {
     Handle             = _widget as IPlatformHandle;
     _widget.Events     = EventMask.AllEventsMask;
     _imContext         = new Gtk.IMMulticontext();
     _imContext.Commit += ImContext_Commit;
     _widget.Realized  += OnRealized;
     _widget.Realize();
     _widget.ButtonPressEvent   += OnButtonPressEvent;
     _widget.ButtonReleaseEvent += OnButtonReleaseEvent;
     _widget.ScrollEvent        += OnScrollEvent;
     _widget.Destroyed          += OnDestroyed;
     _widget.KeyPressEvent      += OnKeyPressEvent;
     _widget.KeyReleaseEvent    += OnKeyReleaseEvent;
     _widget.ExposeEvent        += OnExposeEvent;
     _widget.MotionNotifyEvent  += OnMotionNotifyEvent;
 }
Exemple #8
0
 void Init()
 {
     Handle                 = _window as IPlatformHandle;
     _window.Events         = EventMask.AllEventsMask;
     _imContext             = new Gtk.IMMulticontext();
     _imContext.Commit     += ImContext_Commit;
     _window.Realized      += OnRealized;
     _window.DoubleBuffered = false;
     _window.Realize();
     _window.ButtonPressEvent   += OnButtonPressEvent;
     _window.ButtonReleaseEvent += OnButtonReleaseEvent;
     _window.ScrollEvent        += OnScrollEvent;
     _window.Destroyed          += OnDestroyed;
     _window.KeyPressEvent      += OnKeyPressEvent;
     _window.KeyReleaseEvent    += OnKeyReleaseEvent;
     _window.ExposeEvent        += OnExposeEvent;
     _window.MotionNotifyEvent  += OnMotionNotifyEvent;
 }
 void Init()
 {
     Handle = _window as IPlatformHandle;
     _window.Events = EventMask.AllEventsMask;
     _imContext = new Gtk.IMMulticontext();
     _imContext.Commit += ImContext_Commit;
     _window.Realized += OnRealized;
     _window.DoubleBuffered = false;
     _window.Realize();
     _window.ButtonPressEvent += OnButtonPressEvent;
     _window.ButtonReleaseEvent += OnButtonReleaseEvent;
     _window.ScrollEvent += OnScrollEvent;
     _window.Destroyed += OnDestroyed;
     _window.KeyPressEvent += OnKeyPressEvent;
     _window.KeyReleaseEvent += OnKeyReleaseEvent;
     _window.ExposeEvent += OnExposeEvent;
     _window.MotionNotifyEvent += OnMotionNotifyEvent;
     
 }
Exemple #10
0
        public Controller()
        {
            im_context    = new Gtk.IMMulticontext();
            results_grown = false;

            controllers = new SimpleSearchController [3];

            // Each controller needs to be aware of the controllers before it.
            // Going down the line however is not needed at current.
            controllers [0] = new FirstSearchController();
            controllers [1] = new SecondSearchController(controllers [0]);
            controllers [2] = new ThirdSearchController(controllers [0], controllers [1]);

            // We want to show a blank box during our searches
            // controllers [0].SearchStarted += (u) => { };
            controllers [1].SearchStarted += (u) => {
                if (u && !ControllerExplicitTextMode(Pane.Second))
                {
                    window.ClearPane(Pane.Second);
                }
            };

            controllers [2].SearchStarted += (u) => {
                if (u && !ControllerExplicitTextMode(Pane.Third))
                {
                    window.ClearPane(Pane.Third);
                }
            };

            controllers [0].SearchFinished +=
                (o, state) => SearchFinished(o, state, Pane.First);
            controllers [1].SearchFinished +=
                (o, state) => SearchFinished(o, state, Pane.Second);
            controllers [2].SearchFinished +=
                (o, state) => SearchFinished(o, state, Pane.Third);

            im_context.UsePreedit = false;
            im_context.Commit    += OnIMCommit;
            im_context.FocusIn();
        }
 public static void SetImCursorLocation(Gtk.IMContext ctx, Gdk.Window clientWindow, Gdk.Rectangle cursor)
 {
     // work around GTK+ Bug 663096 - Windows IME position is wrong when Aero glass is enabled
     // https://bugzilla.gnome.org/show_bug.cgi?id=663096
     if (Platform.IsWindows && System.Environment.OSVersion.Version.Major >= 6)
     {
         bool enabled;
         if (DwmIsCompositionEnabled(out enabled) == 0 && enabled)
         {
             var       hwnd = gdk_win32_drawable_get_handle(clientWindow.Toplevel.Handle);
             Win32Rect rect;
             // this module gets the WINVER=6 version of GetWindowRect, which returns the correct value
             if (GetWindowRect(hwnd, out rect))
             {
                 int x, y;
                 clientWindow.Toplevel.GetPosition(out x, out y);
                 cursor.X = cursor.X - x + rect.Left;
                 cursor.Y = cursor.Y - y + rect.Top - cursor.Height;
             }
         }
     }
     ctx.CursorLocation = cursor;
 }