winrt-Windows.UI.Notifications.Management 2.0.0b1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- winrt-Windows.UI.Notifications.Management-2.0.0b1/PKG-INFO +22 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/README.md +7 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/all-requirements.txt +5 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/py.Windows.UI.Notifications.Management.cpp +414 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/pyproject.toml +43 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/pywinrt-version.txt +1 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/requirements.txt +3 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/setup.cfg +4 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/setup.py +17 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/winrt/_winrt_windows_ui_notifications_management.pyi +35 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/winrt/windows/ui/notifications/management/__init__.py +18 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/winrt_Windows.UI.Notifications.Management.egg-info/PKG-INFO +22 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/winrt_Windows.UI.Notifications.Management.egg-info/SOURCES.txt +14 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/winrt_Windows.UI.Notifications.Management.egg-info/dependency_links.txt +1 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/winrt_Windows.UI.Notifications.Management.egg-info/requires.txt +6 -0
- winrt-Windows.UI.Notifications.Management-2.0.0b1/winrt_Windows.UI.Notifications.Management.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: winrt-Windows.UI.Notifications.Management
|
|
3
|
+
Version: 2.0.0b1
|
|
4
|
+
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Repository, https://github.com/pywrint/pywrinrt
|
|
7
|
+
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
8
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Requires-Python: <3.13,>=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Provides-Extra: all
|
|
15
|
+
|
|
16
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
17
|
+
|
|
18
|
+
# winrt-Windows.UI.Notifications.Management
|
|
19
|
+
|
|
20
|
+
Windows Runtime (WinRT) APIs for for the `Windows.UI.Notifications.Management` namespace.
|
|
21
|
+
|
|
22
|
+
This package provides the `winrt.windows.ui.notifications.management` module.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
2
|
+
|
|
3
|
+
# winrt-Windows.UI.Notifications.Management
|
|
4
|
+
|
|
5
|
+
Windows Runtime (WinRT) APIs for for the `Windows.UI.Notifications.Management` namespace.
|
|
6
|
+
|
|
7
|
+
This package provides the `winrt.windows.ui.notifications.management` module.
|
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
|
|
2
|
+
|
|
3
|
+
#include "py.Windows.UI.Notifications.Management.h"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
namespace py::cpp::Windows::UI::Notifications::Management
|
|
7
|
+
{
|
|
8
|
+
// ----- UserNotificationListener class --------------------
|
|
9
|
+
|
|
10
|
+
static PyObject* _new_UserNotificationListener(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
11
|
+
{
|
|
12
|
+
static_assert(py::py_type<winrt::Windows::UI::Notifications::Management::UserNotificationListener>::type_name);
|
|
13
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::UI::Notifications::Management::UserNotificationListener>::type_name);
|
|
14
|
+
return nullptr;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static void _dealloc_UserNotificationListener(py::wrapper::Windows::UI::Notifications::Management::UserNotificationListener* self) noexcept
|
|
18
|
+
{
|
|
19
|
+
auto tp = Py_TYPE(self);
|
|
20
|
+
std::destroy_at(&self->obj);
|
|
21
|
+
tp->tp_free(self);
|
|
22
|
+
Py_DECREF(tp);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static PyObject* UserNotificationListener_ClearNotifications(py::wrapper::Windows::UI::Notifications::Management::UserNotificationListener* self, PyObject* args) noexcept
|
|
26
|
+
{
|
|
27
|
+
auto arg_count = PyTuple_Size(args);
|
|
28
|
+
|
|
29
|
+
if (arg_count == 0)
|
|
30
|
+
{
|
|
31
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Notifications.Management.UserNotificationListener", L"ClearNotifications", 0))
|
|
32
|
+
{
|
|
33
|
+
py::set_arg_count_version_error(0);
|
|
34
|
+
return nullptr;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
try
|
|
38
|
+
{
|
|
39
|
+
self->obj.ClearNotifications();
|
|
40
|
+
Py_RETURN_NONE;
|
|
41
|
+
}
|
|
42
|
+
catch (...)
|
|
43
|
+
{
|
|
44
|
+
py::to_PyErr();
|
|
45
|
+
return nullptr;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else
|
|
49
|
+
{
|
|
50
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
51
|
+
return nullptr;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static PyObject* UserNotificationListener_GetAccessStatus(py::wrapper::Windows::UI::Notifications::Management::UserNotificationListener* self, PyObject* args) noexcept
|
|
56
|
+
{
|
|
57
|
+
auto arg_count = PyTuple_Size(args);
|
|
58
|
+
|
|
59
|
+
if (arg_count == 0)
|
|
60
|
+
{
|
|
61
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Notifications.Management.UserNotificationListener", L"GetAccessStatus", 0))
|
|
62
|
+
{
|
|
63
|
+
py::set_arg_count_version_error(0);
|
|
64
|
+
return nullptr;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
try
|
|
68
|
+
{
|
|
69
|
+
return py::convert(self->obj.GetAccessStatus());
|
|
70
|
+
}
|
|
71
|
+
catch (...)
|
|
72
|
+
{
|
|
73
|
+
py::to_PyErr();
|
|
74
|
+
return nullptr;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else
|
|
78
|
+
{
|
|
79
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
80
|
+
return nullptr;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
static PyObject* UserNotificationListener_GetNotification(py::wrapper::Windows::UI::Notifications::Management::UserNotificationListener* self, PyObject* args) noexcept
|
|
85
|
+
{
|
|
86
|
+
auto arg_count = PyTuple_Size(args);
|
|
87
|
+
|
|
88
|
+
if (arg_count == 1)
|
|
89
|
+
{
|
|
90
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Notifications.Management.UserNotificationListener", L"GetNotification", 1))
|
|
91
|
+
{
|
|
92
|
+
py::set_arg_count_version_error(1);
|
|
93
|
+
return nullptr;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
try
|
|
97
|
+
{
|
|
98
|
+
auto param0 = py::convert_to<uint32_t>(args, 0);
|
|
99
|
+
|
|
100
|
+
return py::convert(self->obj.GetNotification(param0));
|
|
101
|
+
}
|
|
102
|
+
catch (...)
|
|
103
|
+
{
|
|
104
|
+
py::to_PyErr();
|
|
105
|
+
return nullptr;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
else
|
|
109
|
+
{
|
|
110
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
111
|
+
return nullptr;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
static PyObject* UserNotificationListener_GetNotificationsAsync(py::wrapper::Windows::UI::Notifications::Management::UserNotificationListener* self, PyObject* args) noexcept
|
|
116
|
+
{
|
|
117
|
+
auto arg_count = PyTuple_Size(args);
|
|
118
|
+
|
|
119
|
+
if (arg_count == 1)
|
|
120
|
+
{
|
|
121
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Notifications.Management.UserNotificationListener", L"GetNotificationsAsync", 1))
|
|
122
|
+
{
|
|
123
|
+
py::set_arg_count_version_error(1);
|
|
124
|
+
return nullptr;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
try
|
|
128
|
+
{
|
|
129
|
+
auto param0 = py::convert_to<winrt::Windows::UI::Notifications::NotificationKinds>(args, 0);
|
|
130
|
+
|
|
131
|
+
return py::convert(self->obj.GetNotificationsAsync(param0));
|
|
132
|
+
}
|
|
133
|
+
catch (...)
|
|
134
|
+
{
|
|
135
|
+
py::to_PyErr();
|
|
136
|
+
return nullptr;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
else
|
|
140
|
+
{
|
|
141
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
142
|
+
return nullptr;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
static PyObject* UserNotificationListener_RemoveNotification(py::wrapper::Windows::UI::Notifications::Management::UserNotificationListener* self, PyObject* args) noexcept
|
|
147
|
+
{
|
|
148
|
+
auto arg_count = PyTuple_Size(args);
|
|
149
|
+
|
|
150
|
+
if (arg_count == 1)
|
|
151
|
+
{
|
|
152
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Notifications.Management.UserNotificationListener", L"RemoveNotification", 1))
|
|
153
|
+
{
|
|
154
|
+
py::set_arg_count_version_error(1);
|
|
155
|
+
return nullptr;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
try
|
|
159
|
+
{
|
|
160
|
+
auto param0 = py::convert_to<uint32_t>(args, 0);
|
|
161
|
+
|
|
162
|
+
self->obj.RemoveNotification(param0);
|
|
163
|
+
Py_RETURN_NONE;
|
|
164
|
+
}
|
|
165
|
+
catch (...)
|
|
166
|
+
{
|
|
167
|
+
py::to_PyErr();
|
|
168
|
+
return nullptr;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else
|
|
172
|
+
{
|
|
173
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
174
|
+
return nullptr;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
static PyObject* UserNotificationListener_RequestAccessAsync(py::wrapper::Windows::UI::Notifications::Management::UserNotificationListener* self, PyObject* args) noexcept
|
|
179
|
+
{
|
|
180
|
+
auto arg_count = PyTuple_Size(args);
|
|
181
|
+
|
|
182
|
+
if (arg_count == 0)
|
|
183
|
+
{
|
|
184
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Notifications.Management.UserNotificationListener", L"RequestAccessAsync", 0))
|
|
185
|
+
{
|
|
186
|
+
py::set_arg_count_version_error(0);
|
|
187
|
+
return nullptr;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
try
|
|
191
|
+
{
|
|
192
|
+
return py::convert(self->obj.RequestAccessAsync());
|
|
193
|
+
}
|
|
194
|
+
catch (...)
|
|
195
|
+
{
|
|
196
|
+
py::to_PyErr();
|
|
197
|
+
return nullptr;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
else
|
|
201
|
+
{
|
|
202
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
203
|
+
return nullptr;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
static PyObject* UserNotificationListener_get_Current(PyObject* /*unused*/, void* /*unused*/) noexcept
|
|
208
|
+
{
|
|
209
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Notifications.Management.UserNotificationListener", L"Current"))
|
|
210
|
+
{
|
|
211
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
212
|
+
return nullptr;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
try
|
|
216
|
+
{
|
|
217
|
+
return py::convert(winrt::Windows::UI::Notifications::Management::UserNotificationListener::Current());
|
|
218
|
+
}
|
|
219
|
+
catch (...)
|
|
220
|
+
{
|
|
221
|
+
py::to_PyErr();
|
|
222
|
+
return nullptr;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
static PyObject* UserNotificationListener_add_NotificationChanged(py::wrapper::Windows::UI::Notifications::Management::UserNotificationListener* self, PyObject* arg) noexcept
|
|
227
|
+
{
|
|
228
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Notifications.Management.UserNotificationListener", L"NotificationChanged"))
|
|
229
|
+
{
|
|
230
|
+
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
231
|
+
return nullptr;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
try
|
|
235
|
+
{
|
|
236
|
+
auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::Notifications::Management::UserNotificationListener, winrt::Windows::UI::Notifications::UserNotificationChangedEventArgs>>(arg);
|
|
237
|
+
|
|
238
|
+
return py::convert(self->obj.NotificationChanged(param0));
|
|
239
|
+
}
|
|
240
|
+
catch (...)
|
|
241
|
+
{
|
|
242
|
+
py::to_PyErr();
|
|
243
|
+
return nullptr;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
static PyObject* UserNotificationListener_remove_NotificationChanged(py::wrapper::Windows::UI::Notifications::Management::UserNotificationListener* self, PyObject* arg) noexcept
|
|
248
|
+
{
|
|
249
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Notifications.Management.UserNotificationListener", L"NotificationChanged"))
|
|
250
|
+
{
|
|
251
|
+
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
252
|
+
return nullptr;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
try
|
|
256
|
+
{
|
|
257
|
+
auto param0 = py::convert_to<winrt::event_token>(arg);
|
|
258
|
+
|
|
259
|
+
self->obj.NotificationChanged(param0);
|
|
260
|
+
Py_RETURN_NONE;
|
|
261
|
+
}
|
|
262
|
+
catch (...)
|
|
263
|
+
{
|
|
264
|
+
py::to_PyErr();
|
|
265
|
+
return nullptr;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
static PyObject* _assign_array_UserNotificationListener(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
270
|
+
{
|
|
271
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::UI::Notifications::Management::UserNotificationListener>>();
|
|
272
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
273
|
+
{
|
|
274
|
+
return nullptr;
|
|
275
|
+
}
|
|
276
|
+
Py_RETURN_NONE;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
static PyObject* _from_UserNotificationListener(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
280
|
+
{
|
|
281
|
+
try
|
|
282
|
+
{
|
|
283
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
284
|
+
return py::convert(return_value.as<winrt::Windows::UI::Notifications::Management::UserNotificationListener>());
|
|
285
|
+
}
|
|
286
|
+
catch (...)
|
|
287
|
+
{
|
|
288
|
+
py::to_PyErr();
|
|
289
|
+
return nullptr;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
static PyMethodDef _methods_UserNotificationListener[] = {
|
|
294
|
+
{ "clear_notifications", reinterpret_cast<PyCFunction>(UserNotificationListener_ClearNotifications), METH_VARARGS, nullptr },
|
|
295
|
+
{ "get_access_status", reinterpret_cast<PyCFunction>(UserNotificationListener_GetAccessStatus), METH_VARARGS, nullptr },
|
|
296
|
+
{ "get_notification", reinterpret_cast<PyCFunction>(UserNotificationListener_GetNotification), METH_VARARGS, nullptr },
|
|
297
|
+
{ "get_notifications_async", reinterpret_cast<PyCFunction>(UserNotificationListener_GetNotificationsAsync), METH_VARARGS, nullptr },
|
|
298
|
+
{ "remove_notification", reinterpret_cast<PyCFunction>(UserNotificationListener_RemoveNotification), METH_VARARGS, nullptr },
|
|
299
|
+
{ "request_access_async", reinterpret_cast<PyCFunction>(UserNotificationListener_RequestAccessAsync), METH_VARARGS, nullptr },
|
|
300
|
+
{ "add_notification_changed", reinterpret_cast<PyCFunction>(UserNotificationListener_add_NotificationChanged), METH_O, nullptr },
|
|
301
|
+
{ "remove_notification_changed", reinterpret_cast<PyCFunction>(UserNotificationListener_remove_NotificationChanged), METH_O, nullptr },
|
|
302
|
+
{ "_assign_array_", _assign_array_UserNotificationListener, METH_O | METH_STATIC, nullptr },
|
|
303
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_UserNotificationListener), METH_O | METH_STATIC, nullptr },
|
|
304
|
+
{ }
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
static PyGetSetDef _getset_UserNotificationListener[] = {
|
|
308
|
+
{ }
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
static PyType_Slot _type_slots_UserNotificationListener[] =
|
|
312
|
+
{
|
|
313
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_UserNotificationListener) },
|
|
314
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_UserNotificationListener) },
|
|
315
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_UserNotificationListener) },
|
|
316
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_UserNotificationListener) },
|
|
317
|
+
{ },
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
static PyType_Spec type_spec_UserNotificationListener =
|
|
321
|
+
{
|
|
322
|
+
"winrt._winrt_windows_ui_notifications_management.UserNotificationListener",
|
|
323
|
+
sizeof(py::wrapper::Windows::UI::Notifications::Management::UserNotificationListener),
|
|
324
|
+
0,
|
|
325
|
+
Py_TPFLAGS_DEFAULT,
|
|
326
|
+
_type_slots_UserNotificationListener
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
static PyGetSetDef getset_UserNotificationListener_Static[] = {
|
|
330
|
+
{ "current", reinterpret_cast<getter>(UserNotificationListener_get_Current), nullptr, nullptr, nullptr },
|
|
331
|
+
{ }
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
static PyMethodDef methods_UserNotificationListener_Static[] = {
|
|
335
|
+
{ }
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
static PyType_Slot type_slots_UserNotificationListener_Static[] =
|
|
339
|
+
{
|
|
340
|
+
{ Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
|
|
341
|
+
{ Py_tp_getset, reinterpret_cast<void*>(getset_UserNotificationListener_Static) },
|
|
342
|
+
{ Py_tp_methods, reinterpret_cast<void*>(methods_UserNotificationListener_Static) },
|
|
343
|
+
{ }
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
static PyType_Spec type_spec_UserNotificationListener_Static =
|
|
347
|
+
{
|
|
348
|
+
"winrt._winrt_windows_ui_notifications_management.UserNotificationListener_Static",
|
|
349
|
+
static_cast<int>(PyType_Type.tp_basicsize),
|
|
350
|
+
static_cast<int>(PyType_Type.tp_itemsize),
|
|
351
|
+
Py_TPFLAGS_DEFAULT,
|
|
352
|
+
type_slots_UserNotificationListener_Static
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
// ----- Windows.UI.Notifications.Management Initialization --------------------
|
|
356
|
+
PyDoc_STRVAR(module_doc, "Windows::UI::Notifications::Management");
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
static PyModuleDef module_def
|
|
360
|
+
= {PyModuleDef_HEAD_INIT,
|
|
361
|
+
"_winrt_windows_ui_notifications_management",
|
|
362
|
+
module_doc,
|
|
363
|
+
0,
|
|
364
|
+
nullptr,
|
|
365
|
+
nullptr,
|
|
366
|
+
nullptr,
|
|
367
|
+
nullptr,
|
|
368
|
+
nullptr};
|
|
369
|
+
|
|
370
|
+
} // py::cpp::Windows::UI::Notifications::Management
|
|
371
|
+
|
|
372
|
+
PyMODINIT_FUNC PyInit__winrt_windows_ui_notifications_management(void) noexcept
|
|
373
|
+
{
|
|
374
|
+
using namespace py::cpp::Windows::UI::Notifications::Management;
|
|
375
|
+
|
|
376
|
+
if (py::import_winrt_runtime() == -1)
|
|
377
|
+
{
|
|
378
|
+
return nullptr;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
py::pyobj_handle module{PyModule_Create(&module_def)};
|
|
382
|
+
|
|
383
|
+
if (!module)
|
|
384
|
+
{
|
|
385
|
+
return nullptr;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
auto object_type = py::get_object_type();
|
|
389
|
+
if (!object_type)
|
|
390
|
+
{
|
|
391
|
+
return nullptr;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
|
|
395
|
+
|
|
396
|
+
if (!object_bases)
|
|
397
|
+
{
|
|
398
|
+
return nullptr;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
py::pyobj_handle type_UserNotificationListener_Static{PyType_FromSpec(&type_spec_UserNotificationListener_Static)};
|
|
402
|
+
if (!type_UserNotificationListener_Static)
|
|
403
|
+
{
|
|
404
|
+
return nullptr;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
if (py::register_python_type(module.get(), &type_spec_UserNotificationListener, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_UserNotificationListener_Static.get())) == -1)
|
|
408
|
+
{
|
|
409
|
+
return nullptr;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
return module.detach();
|
|
414
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
[build-system]
|
|
4
|
+
requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
|
|
5
|
+
build-backend = "setuptools.build_meta"
|
|
6
|
+
|
|
7
|
+
[project]
|
|
8
|
+
name = "winrt-Windows.UI.Notifications.Management"
|
|
9
|
+
description = "Python projection of Windows Runtime (WinRT) APIs"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Operating System :: Microsoft :: Windows",
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
]
|
|
18
|
+
dynamic = ["version", "dependencies", "optional-dependencies"]
|
|
19
|
+
requires-python = ">=3.9,<3.13"
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
# Homepage = "https://github.com/pywrint/pywrinrt"
|
|
23
|
+
# Documentation = "https://readthedocs.org"
|
|
24
|
+
Repository = "https://github.com/pywrint/pywrinrt"
|
|
25
|
+
Changelog = "https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md"
|
|
26
|
+
|
|
27
|
+
[tool.setuptools.dynamic]
|
|
28
|
+
version = { file = "pywinrt-version.txt" }
|
|
29
|
+
dependencies = { file = "requirements.txt" }
|
|
30
|
+
optional-dependencies.all = { file = "all-requirements.txt" }
|
|
31
|
+
|
|
32
|
+
[tool.cibuildwheel]
|
|
33
|
+
# use local winrt-sdk build dependency
|
|
34
|
+
environment = { PYTHONPATH="../winrt-sdk/src" }
|
|
35
|
+
# don't install winrt-sdk from PyPI
|
|
36
|
+
build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
37
|
+
# don't build for PyPy
|
|
38
|
+
skip = "pp*"
|
|
39
|
+
# suppress warnings about ARM64 testing
|
|
40
|
+
test-skip = "*-win_arm64"
|
|
41
|
+
|
|
42
|
+
[tool.cibuildwheel.windows]
|
|
43
|
+
archs = ["x86", "AMD64", "ARM64"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.0.0-beta.1
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
from setuptools import Extension, setup
|
|
4
|
+
from winrt_sdk import get_include_dirs
|
|
5
|
+
|
|
6
|
+
setup(
|
|
7
|
+
ext_modules=[
|
|
8
|
+
Extension(
|
|
9
|
+
"winrt._winrt_windows_ui_notifications_management",
|
|
10
|
+
sources=["py.Windows.UI.Notifications.Management.cpp"],
|
|
11
|
+
include_dirs=get_include_dirs(),
|
|
12
|
+
extra_compile_args=["/std:c++20", "/permissive-"],
|
|
13
|
+
libraries=["windowsapp"],
|
|
14
|
+
)
|
|
15
|
+
],
|
|
16
|
+
package_data={"winrt": ["*.pyi"]},
|
|
17
|
+
)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
import sys
|
|
5
|
+
import types
|
|
6
|
+
import typing
|
|
7
|
+
import uuid as _uuid
|
|
8
|
+
from builtins import property as _property
|
|
9
|
+
|
|
10
|
+
import winrt._winrt
|
|
11
|
+
import winrt.system
|
|
12
|
+
import winrt.windows.foundation
|
|
13
|
+
import winrt.windows.foundation.collections
|
|
14
|
+
import winrt.windows.ui.notifications
|
|
15
|
+
|
|
16
|
+
from winrt.windows.ui.notifications.management import UserNotificationListenerAccessStatus
|
|
17
|
+
|
|
18
|
+
Self = typing.TypeVar('Self')
|
|
19
|
+
|
|
20
|
+
class UserNotificationListener_Static(type):
|
|
21
|
+
@_property
|
|
22
|
+
def current(cls) -> typing.Optional[UserNotificationListener]: ...
|
|
23
|
+
|
|
24
|
+
class UserNotificationListener(winrt.system.Object, metaclass=UserNotificationListener_Static):
|
|
25
|
+
@staticmethod
|
|
26
|
+
def _from(obj: winrt.system.Object, /) -> UserNotificationListener: ...
|
|
27
|
+
def clear_notifications(self) -> None: ...
|
|
28
|
+
def get_access_status(self) -> UserNotificationListenerAccessStatus: ...
|
|
29
|
+
def get_notification(self, notification_id: winrt.system.UInt32, /) -> typing.Optional[winrt.windows.ui.notifications.UserNotification]: ...
|
|
30
|
+
def get_notifications_async(self, kinds: winrt.windows.ui.notifications.NotificationKinds, /) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.foundation.collections.IVectorView[winrt.windows.ui.notifications.UserNotification]]: ...
|
|
31
|
+
def remove_notification(self, notification_id: winrt.system.UInt32, /) -> None: ...
|
|
32
|
+
def request_access_async(self) -> winrt.windows.foundation.IAsyncOperation[UserNotificationListenerAccessStatus]: ...
|
|
33
|
+
def add_notification_changed(self, handler: winrt.windows.foundation.TypedEventHandler[UserNotificationListener, winrt.windows.ui.notifications.UserNotificationChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
|
|
34
|
+
def remove_notification_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
|
|
35
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
|
|
2
|
+
|
|
3
|
+
import enum
|
|
4
|
+
|
|
5
|
+
import winrt.system
|
|
6
|
+
from winrt import _winrt_windows_ui_notifications_management
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"UserNotificationListenerAccessStatus",
|
|
10
|
+
"UserNotificationListener",
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
class UserNotificationListenerAccessStatus(enum.IntEnum):
|
|
14
|
+
UNSPECIFIED = 0
|
|
15
|
+
ALLOWED = 1
|
|
16
|
+
DENIED = 2
|
|
17
|
+
|
|
18
|
+
UserNotificationListener = _winrt_windows_ui_notifications_management.UserNotificationListener
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: winrt-Windows.UI.Notifications.Management
|
|
3
|
+
Version: 2.0.0b1
|
|
4
|
+
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Repository, https://github.com/pywrint/pywrinrt
|
|
7
|
+
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
8
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Requires-Python: <3.13,>=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Provides-Extra: all
|
|
15
|
+
|
|
16
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
17
|
+
|
|
18
|
+
# winrt-Windows.UI.Notifications.Management
|
|
19
|
+
|
|
20
|
+
Windows Runtime (WinRT) APIs for for the `Windows.UI.Notifications.Management` namespace.
|
|
21
|
+
|
|
22
|
+
This package provides the `winrt.windows.ui.notifications.management` module.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
all-requirements.txt
|
|
3
|
+
py.Windows.UI.Notifications.Management.cpp
|
|
4
|
+
pyproject.toml
|
|
5
|
+
pywinrt-version.txt
|
|
6
|
+
requirements.txt
|
|
7
|
+
setup.py
|
|
8
|
+
winrt/_winrt_windows_ui_notifications_management.pyi
|
|
9
|
+
winrt/windows/ui/notifications/management/__init__.py
|
|
10
|
+
winrt_Windows.UI.Notifications.Management.egg-info/PKG-INFO
|
|
11
|
+
winrt_Windows.UI.Notifications.Management.egg-info/SOURCES.txt
|
|
12
|
+
winrt_Windows.UI.Notifications.Management.egg-info/dependency_links.txt
|
|
13
|
+
winrt_Windows.UI.Notifications.Management.egg-info/requires.txt
|
|
14
|
+
winrt_Windows.UI.Notifications.Management.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
winrt
|