public SystemForegroundTitleListener() { _HandleSystemForegroundEvent = HandleSystemForegroundEvent; _HandleObjectNamechangeEvent = HandleObjectNamechangeEvent; Refs.Set(ref hFocusedApplicationEvent, SetWinEventHook(Api.EVENT_SYSTEM_FOREGROUND, _HandleSystemForegroundEvent)); }
internal static SafeHandle SetWinEventHook(uint eventId, uint processId, uint threadId, Api.WinEventDelegate winEventDelegate) { return(Api.SetWinEventHook(eventId, eventId, IntPtr.Zero, winEventDelegate, processId, threadId, Api.WINEVENT_OUTOFCONTEXT)); }
internal static SafeHandle SetWinEventHook(uint eventId, Api.WinEventDelegate winEventDelegate) { return(SetWinEventHook(eventId, 0, 0, winEventDelegate)); }