detect-wakeup.c
Go to the documentation of this file.
1 #include "uv.h"
2 #include "internal.h"
3 #include "winapi.h"
4 
6 
8  /* Try registering system power event callback. This is the cleanest
9  * method, but it will only work on Win8 and above.
10  */
12 }
13 
14 static ULONG CALLBACK uv__system_resume_callback(PVOID Context,
15  ULONG Type,
16  PVOID Setting) {
19 
20  return 0;
21 }
22 
25  _HPOWERNOTIFY registration_handle;
26 
28  return;
29 
31  recipient.Context = NULL;
32  (*pPowerRegisterSuspendResumeNotification)(DEVICE_NOTIFY_CALLBACK,
33  &recipient,
34  &registration_handle);
35 }
_DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS::Callback
_PDEVICE_NOTIFY_CALLBACK_ROUTINE Callback
Definition: winapi.h:4691
_DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS::Context
PVOID Context
Definition: winapi.h:4692
_HPOWERNOTIFY
PVOID _HPOWERNOTIFY
Definition: winapi.h:4695
winapi.h
PBT_APMRESUMEAUTOMATIC
#define PBT_APMRESUMEAUTOMATIC
Definition: winapi.h:4676
_DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS
Definition: winapi.h:4690
Type
Definition: bloaty/third_party/protobuf/src/google/protobuf/type.pb.h:182
pPowerRegisterSuspendResumeNotification
sPowerRegisterSuspendResumeNotification pPowerRegisterSuspendResumeNotification
Definition: winapi.c:43
uv__system_resume_callback
static ULONG CALLBACK uv__system_resume_callback(PVOID Context, ULONG Type, PVOID Setting)
Definition: detect-wakeup.c:14
DEVICE_NOTIFY_CALLBACK
#define DEVICE_NOTIFY_CALLBACK
Definition: winapi.h:4672
uv.h
uv__register_system_resume_callback
static void uv__register_system_resume_callback(void)
Definition: detect-wakeup.c:23
gen_settings_ids.Setting
Setting
Definition: gen_settings_ids.py:26
uv__wake_all_loops
void uv__wake_all_loops(void)
Definition: win/core.c:162
uv__init_detect_system_wakeup
void uv__init_detect_system_wakeup(void)
Definition: detect-wakeup.c:7
internal.h
PBT_APMRESUMESUSPEND
#define PBT_APMRESUMESUSPEND
Definition: winapi.h:4680


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:11