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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/9526
Author: @zadjii-msft
Created: 3/17/2021
Status: Merged
Merged: 3/18/2021
Merged by: @undefined

Base: mainHead: dev/migrie/f/split-termcontrol-eventargs


📝 Commits (10+)

  • 2402c59 Hokay, so that gets the control as a lib/dll split
  • 24765d7 its-all-coming-together.gif
  • 54f443b can I get a big woop woop from all my homies
  • 322d511 Fix the tests
  • 8f8cf59 Rename Microsoft.Terminal.TerminalControl to just Microsoft.Terminal.Control
  • eee5bee some dead code
  • 04d403c Change the GUID, project name
  • e8d06d7 Merge remote-tracking branch 'origin/main' into dev/migrie/r/split-terminalcontrol-into-lib
  • f8e969e oh! IT CAUGHT AN ISSUE! YAY!
  • 8c6c7ec Bite-sized refactor: Move all the args in TermControl to their own file. Convert some older macro uses to TYPED_EVENT

📊 Changes

18 files changed (+295 additions, -226 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppLogic.cpp (+1 -5)
📝 src/cascadia/TerminalApp/AppLogic.h (+1 -1)
📝 src/cascadia/TerminalApp/MinMaxCloseControl.cpp (+3 -8)
📝 src/cascadia/TerminalApp/MinMaxCloseControl.h (+3 -3)
📝 src/cascadia/TerminalApp/Pane.cpp (+1 -1)
📝 src/cascadia/TerminalApp/Pane.h (+1 -1)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+10 -22)
📝 src/cascadia/TerminalApp/TerminalPage.h (+10 -15)
📝 src/cascadia/TerminalApp/TerminalTab.cpp (+1 -1)
src/cascadia/TerminalControl/EventArgs.cpp (+12 -0)
src/cascadia/TerminalControl/EventArgs.h (+129 -0)
src/cascadia/TerminalControl/EventArgs.idl (+65 -0)
src/cascadia/TerminalControl/IDirectKeyListener.idl (+14 -0)
📝 src/cascadia/TerminalControl/TermControl.cpp (+9 -17)
📝 src/cascadia/TerminalControl/TermControl.h (+9 -89)
📝 src/cascadia/TerminalControl/TermControl.idl (+15 -63)
📝 src/cascadia/TerminalControl/TerminalControlLib.vcxproj (+8 -0)
📝 src/cascadia/TerminalControl/pch.h (+3 -0)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/9526 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 3/17/2021 **Status:** ✅ Merged **Merged:** 3/18/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/f/split-termcontrol-eventargs` --- ### 📝 Commits (10+) - [`2402c59`](https://github.com/microsoft/terminal/commit/2402c59f3da0062e2e297ef269affb93539d697a) Hokay, so that gets the control as a lib/dll split - [`24765d7`](https://github.com/microsoft/terminal/commit/24765d708a437c2c952cd300a0715cc716975cdf) its-all-coming-together.gif - [`54f443b`](https://github.com/microsoft/terminal/commit/54f443b17f29b89b80ef5db0e83cfce1a27116f7) can I get a big woop woop from all my homies - [`322d511`](https://github.com/microsoft/terminal/commit/322d511034ae4cb73ba740db6e37714a97b5787f) Fix the tests - [`8f8cf59`](https://github.com/microsoft/terminal/commit/8f8cf5996eb216c53cf9bc9e8eeda34078ef59b2) Rename Microsoft.Terminal.TerminalControl to just Microsoft.Terminal.Control - [`eee5bee`](https://github.com/microsoft/terminal/commit/eee5beeaf37b215ed326679d95ab469c847950f1) some dead code - [`04d403c`](https://github.com/microsoft/terminal/commit/04d403ca97a09887a6bdf392fbba7ef82329a3b0) Change the GUID, project name - [`e8d06d7`](https://github.com/microsoft/terminal/commit/e8d06d7a74d30c5e4624fc6edc7a768983fd516a) Merge remote-tracking branch 'origin/main' into dev/migrie/r/split-terminalcontrol-into-lib - [`f8e969e`](https://github.com/microsoft/terminal/commit/f8e969e44b58bf0e4529255db15614a21108a604) oh! IT CAUGHT AN ISSUE! YAY! - [`8c6c7ec`](https://github.com/microsoft/terminal/commit/8c6c7ece5d95ed26e2914089864002f956b07135) Bite-sized refactor: Move all the args in TermControl to their own file. Convert some older macro uses to TYPED_EVENT ### 📊 Changes **18 files changed** (+295 additions, -226 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+1 -5) 📝 `src/cascadia/TerminalApp/AppLogic.h` (+1 -1) 📝 `src/cascadia/TerminalApp/MinMaxCloseControl.cpp` (+3 -8) 📝 `src/cascadia/TerminalApp/MinMaxCloseControl.h` (+3 -3) 📝 `src/cascadia/TerminalApp/Pane.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/Pane.h` (+1 -1) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+10 -22) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+10 -15) 📝 `src/cascadia/TerminalApp/TerminalTab.cpp` (+1 -1) ➕ `src/cascadia/TerminalControl/EventArgs.cpp` (+12 -0) ➕ `src/cascadia/TerminalControl/EventArgs.h` (+129 -0) ➕ `src/cascadia/TerminalControl/EventArgs.idl` (+65 -0) ➕ `src/cascadia/TerminalControl/IDirectKeyListener.idl` (+14 -0) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+9 -17) 📝 `src/cascadia/TerminalControl/TermControl.h` (+9 -89) 📝 `src/cascadia/TerminalControl/TermControl.idl` (+15 -63) 📝 `src/cascadia/TerminalControl/TerminalControlLib.vcxproj` (+8 -0) 📝 `src/cascadia/TerminalControl/pch.h` (+3 -0) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:23:07 +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#27622