code: public final void sinkEvents(Widget widget, Set<String> typeNames) {
      if (typeNames == null) {
        return;
      }
  
      int eventsToSink = 0;
      for (String typeName : typeNames) {
        int typeInt = Event.getTypeInt(typeName);
        if (typeInt < 0) {
          widget.sinkBitlessEvent(typeName);
        } else {
          typeInt = sinkEvent(widget, typeName);
          if (typeInt > 0) {
            eventsToSink |= typeInt;
          }
        }
      }
      if (eventsToSink > 0) {
        widget.sinkEvents(eventsToSink);
      }
    }
docs: Sink events on the widget.
  
  @param widget the {@link Widget} that will handle the events
  @param typeNames the names of the events to sink