closeEvent reimplementation
5482
def closeEvent(self, event):
        """"""
        if self.closing(True):
            event.accept()
        else:
            event.ignore()
967506
function restoreEventListenerImplementation() {
    global.Element.prototype.addEventListener = nativeAddEventListener;
    global.Element.prototype.removeEventListener = nativeRemoveEventListener;
    global.document.addEventListener = nativeAddEventListener;
    global.document.removeEventListener = nativeRemoveEventListener;
  }
1278341
@Handler
    public void onClose(Close event, Channel channel)
            throws InterruptedException {
        Writer writer = inputWriters.get(channel);
        if (writer != null) {
            writer.close(event);
        }
        writer = outputWriters.get(channel);
        if (writer != null) {
            writer.close(event);
        }
    }
715014
function (event) {
      var $toggleBtn = $(event.target);
      var $descWrapper = $toggleBtn.parent().next();
      var $descendants = $descWrapper.find('.node');
      var $children = $descWrapper.children().children('.node');
      if ($children.is('.sliding')) { return; }
      $toggleBtn.toggleClass('fa-plus-square fa-minus-square');
      if ($descendants.eq(0).is('.slide-up')) {
        $descWrapper.removeClass('hidden');
        this.repaint($children.get(0));
        $children.addClass('sliding').removeClass('slide-up').eq(0).one('transitionend', { 'vNodes': $children }, this.expandVNodesEnd);
      } else {
        $descendants.addClass('sliding slide-up').eq(0).one('transitionend', { 'vNodes': $descendants }, this.collapseVNodesEnd);
        $descendants.find('.toggleBtn').removeClass('fa-minus-square').addClass('fa-plus-square');
      }
    }
766599
def close(self):
        ''''''
        self.close_event.set()
        if self.is_alive():
            self.child.join(2)
598346
def closeEvent(self, e):
        """"""
        if self._closed:
            return
        res = self.emit('close')
        # Discard the close event if False is returned by one of the callback
        # functions.
        if False in res:  # pragma: no cover
            e.ignore()
            return
        super(GUI, self).closeEvent(e)
        self._closed = True
1161891
function(){
    if (this.isClosed) { return; }

    // allow the close to be stopped by returning `false`
    // from the `onBeforeClose` method
    var shouldClose = this.triggerMethod("before:close");
    if (shouldClose === false){
      return;
    }

    // mark as closed before doing the actual close, to
    // prevent infinite loops within "close" event handlers
    // that are trying to close other views
    this.isClosed = true;
    this.triggerMethod("close");

    // unbind UI elements
    this.unbindUIElements();

    // remove the view from the DOM
    this.remove();
  }
860964
function handleMousedown(event) {

  // get currently open dialogue
  var dialogue = getDialogueCurrent();

  if (dialogue.options.hardClose) {
    return;
  }

  var result = helper.isInside(event.target, dialogue.dialogue);
  if (!result) {
    closeInstance(dialogue);
  }
}
618111
def put_event(self, evt):
        
        evt.step = self.global_step
        evt.wall_time = time.time()
        self._dispatch(lambda m: m.process_event(evt))
1193614
function() {
            var self = this;

            $.each(self.customEventHandlers, function(eventName) {
                // Namespace the custom event
                // This allow to easily unbound only custom events and not regular ones
                var fullEventName = eventName + '.' + pluginName + ".custom";
                self.$container.off(fullEventName).on(fullEventName, "[data-id]", function (e) {
                    var $elem = $(this);
                    var id = $elem.attr('data-id');
                    var type = $elem.attr('data-type').replace('-text', '');

                    if (!self.panning &&
                        self.customEventHandlers[eventName][type] !== undefined &&
                        self.customEventHandlers[eventName][type][id] !== undefined)
                    {
                        // Get back related elem
                        var elem = self.customEventHandlers[eventName][type][id];
                        // Run callback provided by user
                        elem.options.eventHandlers[eventName](e, id, elem.mapElem, elem.textElem, elem.options);
                    }
                });
            });

        }
298429
def closeEvent(self, event):
        
        self.acqmodel.stop_listening() # close listener threads
        self.saveInputs(self.inputsFilename)

        # save GUI size
        settings = QtCore.QSettings("audiolab")
        settings.setValue("geometry", self.saveGeometry())
        settings.setValue("windowState", self.saveState())
        logger = logging.getLogger('main')
        logger.info('All user settings saved')

        self.garbage_timer.stop()
        gc.enable()
896061
function( theEvent ) {
        var target,
            targetElement = theEvent.target,
            ui = this._ui;

        if ( !this._isOpen ) {
            return;
        }

        if ( targetElement !== ui.container[ 0 ] ) {
            target = $( targetElement );
            if ( !$.contains( ui.container[ 0 ], targetElement ) ) {
                $( this.document[ 0 ].activeElement ).one( "focus", $.proxy( function() {
                    this._safelyBlur( targetElement );
                }, this ) );
                ui.focusElement.focus();
                theEvent.preventDefault();
                theEvent.stopImmediatePropagation();
                return false;
            } else if ( ui.focusElement[ 0 ] === ui.container[ 0 ] ) {
                ui.focusElement = target;
            }
        }

        this._ignoreResizeEvents();
    }
1142924
function (domEvent) {
            if (this.conf.closeOnMouseOut) {
                if (!this.conf.closeOnMouseOutDelay) { // If delay is not set
                    // OR is equal to zero
                    this.close(domEvent);
                } else {
                    this.cancelMouseOutTimer();
                    this._mouseOutTimer = ariaCoreTimer.addCallback({
                        fn : this._onMouseOutTimeout,
                        scope : this,
                        delay : this.conf.closeOnMouseOutDelay
                    });

                    this._attachMouseOverListener();
                }
            }
        }
592699
function (successCallback, errorCallback, deviceHandle) {
		winble.logger.logApiEntry("close");
		winble.deviceManager.closeDevice(successCallback, errorCallback, deviceHandle);
		winble.logger.logApiExit("close");
	}
944776
@Handler(channels = NetworkChannel.class)
    public void onClosed(Closed event, IOSubchannel netChannel) {
        LinkedIOSubchannel.downstreamChannel(this, netChannel,
            WebAppMsgChannel.class).ifPresent(appChannel -> {
                appChannel.handleClosed(event);
            });
    }
379911
def closeEvent(self, event):
        
        if not self.viewWidget().canClose():
            event.ignore()
        else:
            super(XViewDialog, self).closeEvent(event)
752650
def resizeEvent(self, event):
        
        super(XWalkthroughWidget, self).resizeEvent(event)
        
        if self.isVisible():
            self.autoLayout()