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; }
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; }