[PR #9526] Move events out of TermControl.h ; Use TYPED_EVENT in more places #27627

Closed
opened 2026-01-31 09:23:08 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/9526

State: closed
Merged: Yes


This is a small refactor on my way to much bigger, more painful refactors. This PR does five things:

  • TermControl.* has historically had all the control-relevant EventArgs defined in the same file as TermControl. That's just added clutter to the files, clutter that could have been in it's own place. We'll move all those event arg to their own files.
  • We'll also move IDirectKeyListener to its own file while we're at it.
  • We'll update some of TermControl's old DEFINE/DECLARE_TYPED_EVENT macros to the newer TYPED_EVENT macro, which is a bit nicer.
  • We'll change TermControl.TitleChanged to a typed event. I needed that for a future PR, so let's just do it here
  • While we're updating TYPED_EVENT macros, let's do TerminalPage too.

checklist

  • I work here
  • This is work for #1256, but we've got a long way to go before that works.
**Original Pull Request:** https://github.com/microsoft/terminal/pull/9526 **State:** closed **Merged:** Yes --- This is a small refactor on my way to much bigger, more painful refactors. This PR does five things: * `TermControl.*` has historically had all the control-relevant EventArgs defined in the same file as TermControl. That's just added clutter to the files, clutter that could have been in it's own place. We'll move all those event arg to their own files. * We'll also move `IDirectKeyListener` to its own file while we're at it. * We'll update some of `TermControl`'s old `DEFINE`/`DECLARE_TYPED_EVENT` macros to the newer `TYPED_EVENT` macro, which is a bit nicer. * We'll change `TermControl.TitleChanged` to a typed event. I needed that for a future PR, so let's just do it here * While we're updating `TYPED_EVENT` macros, let's do `TerminalPage` too. ### checklist * [x] I work here * [x] This is work for #1256, but we've got a long way to go before that works.
claunia added the pull-request label 2026-01-31 09:23:08 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27627