186 references to User32
Microsoft.Win32.SystemEvents (186)
_generated\0\LibraryImports.g.cs (15)
66public static partial int DispatchMessageW(ref global::Interop.User32.MSG msg) 70fixed (global::Interop.User32.MSG* __msg_native = &msg) 78static extern unsafe int __PInvoke(global::Interop.User32.MSG* __msg_native); 88public static partial bool GetClassInfoW(nint hInst, string lpszClass, ref global::Interop.User32.WNDCLASS wc) 93fixed (global::Interop.User32.WNDCLASS* __wc_native = &wc) 104static extern unsafe int __PInvoke(nint __hInst_native, ushort* __lpszClass_native, global::Interop.User32.WNDCLASS* __wc_native); 114public static partial int GetMessageW(ref global::Interop.User32.MSG msg, nint hwnd, int msgMin, int msgMax) 118fixed (global::Interop.User32.MSG* __msg_native = &msg) 126static extern unsafe int __PInvoke(global::Interop.User32.MSG* __msg_native, nint __hwnd_native, int __msgMin_native, int __msgMax_native); 251public static partial short RegisterClassW(ref global::Interop.User32.WNDCLASS wc) 256fixed (global::Interop.User32.WNDCLASS* __wc_native = &wc) 267static extern unsafe short __PInvoke(global::Interop.User32.WNDCLASS* __wc_native); 347public static partial bool TranslateMessage(ref global::Interop.User32.MSG msg) 352fixed (global::Interop.User32.MSG* __msg_native = &msg) 362static extern unsafe int __PInvoke(global::Interop.User32.MSG* __msg_native);
Microsoft\Win32\SystemEvents.cs (171)
41private Interop.User32.WndProc? _windowProc; 77IntPtr hwinsta = Interop.User32.GetProcessWindowStation(); 83Interop.User32.USEROBJECTFLAGS flags = default; 85if (Interop.User32.GetUserObjectInformationW(hwinsta, Interop.User32.UOI_FLAGS, &flags, (uint)sizeof(Interop.User32.USEROBJECTFLAGS), ref dummy)) 87if ((flags.dwFlags & Interop.User32.WSF_VISIBLE) == 0) 356case Interop.User32.CTRL_LOGOFF_EVENT: 357OnSessionEnded((IntPtr)1, (IntPtr)Interop.User32.ENDSESSION_LOGOFF); 360case Interop.User32.CTRL_SHUTDOWN_EVENT: 391IntPtr timerId = Interop.User32.SendMessageW(s_systemEvents!._windowHandle, 392Interop.User32.WM_CREATETIMER, (IntPtr)interval, IntPtr.Zero); 417if (Interop.User32.IsWindow(handle) && DefWndProc != IntPtr.Zero) 426Interop.User32.SetWindowLongW(handle, Interop.User32.GWL_WNDPROC, DefWndProc); 427Interop.User32.SetClassLongW(handle, Interop.User32.GCL_WNDPROC, DefWndProc); 431Interop.User32.SetWindowLongPtrW(handle, Interop.User32.GWL_WNDPROC, DefWndProc); 432Interop.User32.SetClassLongPtrW(handle, Interop.User32.GCL_WNDPROC, DefWndProc); 436if (Interop.User32.IsWindow(handle) && !Interop.User32.DestroyWindow(handle)) 441Interop.User32.PostMessageW(handle, Interop.User32.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 446Interop.User32.UnregisterClassW(s_className!, hInstance); 523if (msg == Interop.User32.WM_SETTINGCHANGE) 537case Interop.User32.SPI_SETACCESSTIMEOUT: 538case Interop.User32.SPI_SETFILTERKEYS: 539case Interop.User32.SPI_SETHIGHCONTRAST: 540case Interop.User32.SPI_SETMOUSEKEYS: 541case Interop.User32.SPI_SETSCREENREADER: 542case Interop.User32.SPI_SETSERIALKEYS: 543case Interop.User32.SPI_SETSHOWSOUNDS: 544case Interop.User32.SPI_SETSOUNDSENTRY: 545case Interop.User32.SPI_SETSTICKYKEYS: 546case Interop.User32.SPI_SETTOGGLEKEYS: 550case Interop.User32.SPI_SETDESKWALLPAPER: 551case Interop.User32.SPI_SETFONTSMOOTHING: 552case Interop.User32.SPI_SETCURSORS: 553case Interop.User32.SPI_SETDESKPATTERN: 554case Interop.User32.SPI_SETGRIDGRANULARITY: 555case Interop.User32.SPI_SETWORKAREA: 559case Interop.User32.SPI_ICONHORIZONTALSPACING: 560case Interop.User32.SPI_ICONVERTICALSPACING: 561case Interop.User32.SPI_SETICONMETRICS: 562case Interop.User32.SPI_SETICONS: 563case Interop.User32.SPI_SETICONTITLELOGFONT: 564case Interop.User32.SPI_SETICONTITLEWRAP: 568case Interop.User32.SPI_SETDOUBLECLICKTIME: 569case Interop.User32.SPI_SETDOUBLECLKHEIGHT: 570case Interop.User32.SPI_SETDOUBLECLKWIDTH: 571case Interop.User32.SPI_SETMOUSE: 572case Interop.User32.SPI_SETMOUSEBUTTONSWAP: 573case Interop.User32.SPI_SETMOUSEHOVERHEIGHT: 574case Interop.User32.SPI_SETMOUSEHOVERTIME: 575case Interop.User32.SPI_SETMOUSESPEED: 576case Interop.User32.SPI_SETMOUSETRAILS: 577case Interop.User32.SPI_SETSNAPTODEFBUTTON: 578case Interop.User32.SPI_SETWHEELSCROLLLINES: 579case Interop.User32.SPI_SETCURSORSHADOW: 580case Interop.User32.SPI_SETHOTTRACKING: 581case Interop.User32.SPI_SETTOOLTIPANIMATION: 582case Interop.User32.SPI_SETTOOLTIPFADE: 586case Interop.User32.SPI_SETKEYBOARDDELAY: 587case Interop.User32.SPI_SETKEYBOARDPREF: 588case Interop.User32.SPI_SETKEYBOARDSPEED: 589case Interop.User32.SPI_SETLANGTOGGLE: 593case Interop.User32.SPI_SETMENUDROPALIGNMENT: 594case Interop.User32.SPI_SETMENUFADE: 595case Interop.User32.SPI_SETMENUSHOWDELAY: 596case Interop.User32.SPI_SETMENUANIMATION: 597case Interop.User32.SPI_SETSELECTIONFADE: 601case Interop.User32.SPI_SETLOWPOWERACTIVE: 602case Interop.User32.SPI_SETLOWPOWERTIMEOUT: 603case Interop.User32.SPI_SETPOWEROFFACTIVE: 604case Interop.User32.SPI_SETPOWEROFFTIMEOUT: 608case Interop.User32.SPI_SETSCREENSAVEACTIVE: 609case Interop.User32.SPI_SETSCREENSAVERRUNNING: 610case Interop.User32.SPI_SETSCREENSAVETIMEOUT: 614case Interop.User32.SPI_SETKEYBOARDCUES: 615case Interop.User32.SPI_SETCOMBOBOXANIMATION: 616case Interop.User32.SPI_SETLISTBOXSMOOTHSCROLLING: 617case Interop.User32.SPI_SETGRADIENTCAPTIONS: 618case Interop.User32.SPI_SETUIEFFECTS: 619case Interop.User32.SPI_SETACTIVEWINDOWTRACKING: 620case Interop.User32.SPI_SETACTIVEWNDTRKZORDER: 621case Interop.User32.SPI_SETACTIVEWNDTRKTIMEOUT: 622case Interop.User32.SPI_SETANIMATION: 623case Interop.User32.SPI_SETBORDER: 624case Interop.User32.SPI_SETCARETWIDTH: 625case Interop.User32.SPI_SETDRAGFULLWINDOWS: 626case Interop.User32.SPI_SETDRAGHEIGHT: 627case Interop.User32.SPI_SETDRAGWIDTH: 628case Interop.User32.SPI_SETFOREGROUNDFLASHCOUNT: 629case Interop.User32.SPI_SETFOREGROUNDLOCKTIMEOUT: 630case Interop.User32.SPI_SETMINIMIZEDMETRICS: 631case Interop.User32.SPI_SETNONCLIENTMETRICS: 632case Interop.User32.SPI_SETSHOWIMEUI: 638else if (msg == Interop.User32.WM_SYSCOLORCHANGE) 671Interop.User32.WNDCLASS windowClass = new Interop.User32.WNDCLASS 673hbrBackground = (IntPtr)(Interop.User32.COLOR_WINDOW + 1), 679if (Interop.User32.RegisterClassW(ref windowClass) == 0) 687_windowHandle = Interop.User32.CreateWindowExW( 691Interop.User32.WS_POPUP, 758int thread = Interop.User32.GetWindowThreadProcessId(s_systemEvents!._windowHandle, &pid); 769s_threadCallbackMessage = Interop.User32.RegisterWindowMessageW("SystemEventsThreadCallbackMessage"); 782Interop.User32.PostMessageW(s_systemEvents!._windowHandle, s_threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 793int res = (int)Interop.User32.SendMessageW(s_systemEvents._windowHandle, 794Interop.User32.WM_KILLTIMER, timerId, IntPtr.Zero); 809IntPtr res = Interop.User32.SetTimer(_windowHandle, timerId, (int)wParam, IntPtr.Zero); 847bool res = Interop.User32.KillTimer(_windowHandle, wParam); 860case Interop.User32.PBT_APMSUSPEND: 861case Interop.User32.PBT_APMSTANDBY: 865case Interop.User32.PBT_APMRESUMECRITICAL: 866case Interop.User32.PBT_APMRESUMESUSPEND: 867case Interop.User32.PBT_APMRESUMESTANDBY: 871case Interop.User32.PBT_APMBATTERYLOW: 872case Interop.User32.PBT_APMPOWERSTATUSCHANGE: 873case Interop.User32.PBT_APMOEMEVENT: 895if (((unchecked((int)(long)lParam)) & Interop.User32.ENDSESSION_LOGOFF) != 0) 916if ((((long)lParam) & Interop.User32.ENDSESSION_LOGOFF) != 0) 1078case Interop.User32.WM_SETTINGCHANGE: 1089Interop.User32.PostMessageW(_windowHandle, Interop.User32.WM_REFLECT + msg, wParam, newStringPtr); 1091case Interop.User32.WM_WTSSESSION_CHANGE: 1094case Interop.User32.WM_SYSCOLORCHANGE: 1095case Interop.User32.WM_COMPACTING: 1096case Interop.User32.WM_DISPLAYCHANGE: 1097case Interop.User32.WM_FONTCHANGE: 1098case Interop.User32.WM_PALETTECHANGED: 1099case Interop.User32.WM_TIMECHANGE: 1100case Interop.User32.WM_TIMER: 1101case Interop.User32.WM_THEMECHANGED: 1102Interop.User32.PostMessageW(_windowHandle, Interop.User32.WM_REFLECT + msg, wParam, lParam); 1105case Interop.User32.WM_CREATETIMER: 1108case Interop.User32.WM_KILLTIMER: 1111case Interop.User32.WM_REFLECT + Interop.User32.WM_SETTINGCHANGE: 1114OnUserPreferenceChanging(msg - Interop.User32.WM_REFLECT, wParam, lParam); 1115OnUserPreferenceChanged(msg - Interop.User32.WM_REFLECT, wParam, lParam); 1133case Interop.User32.WM_REFLECT + Interop.User32.WM_SYSCOLORCHANGE: 1134OnUserPreferenceChanging(msg - Interop.User32.WM_REFLECT, wParam, lParam); 1135OnUserPreferenceChanged(msg - Interop.User32.WM_REFLECT, wParam, lParam); 1138case Interop.User32.WM_REFLECT + Interop.User32.WM_THEMECHANGED: 1142case Interop.User32.WM_QUERYENDSESSION: 1145case Interop.User32.WM_ENDSESSION: 1149case Interop.User32.WM_POWERBROADCAST: 1154case Interop.User32.WM_REFLECT + Interop.User32.WM_COMPACTING: 1158case Interop.User32.WM_REFLECT + Interop.User32.WM_DISPLAYCHANGE: 1163case Interop.User32.WM_REFLECT + Interop.User32.WM_FONTCHANGE: 1167case Interop.User32.WM_REFLECT + Interop.User32.WM_PALETTECHANGED: 1171case Interop.User32.WM_REFLECT + Interop.User32.WM_TIMECHANGE: 1175case Interop.User32.WM_REFLECT + Interop.User32.WM_TIMER: 1179case Interop.User32.WM_DESTROY: 1180Interop.User32.PostQuitMessage(0); 1194return Interop.User32.DefWindowProcW(hWnd, msg, wParam, lParam); 1212Interop.User32.MSG msg = default; 1214while (Interop.User32.GetMessageW(ref msg, _windowHandle, 0, 0) > 0) 1216Interop.User32.TranslateMessage(ref msg); 1217Interop.User32.DispatchMessageW(ref msg);