1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

Compare commits

...

48 Commits

Author SHA1 Message Date
cjy880927
0bf00d285c
Merge 5235686be0 into f9af971bd7 2024-06-25 00:34:57 +02:00
Santino Mazza
f9af971bd7 mshtml: Implement MarkupServices_ParseString. 2024-06-24 20:57:04 +02:00
Santino Mazza
f9a8f2f1a3 mshtml: Implement MarkupServices_CreateMarkupContainer. 2024-06-24 20:57:04 +02:00
Santino Mazza
e2100e3f1e mshtml/tests: Test for IMarkupServices. 2024-06-24 20:57:04 +02:00
Ilia Docin
ac4e478015 sane.ds: Add SANE option settable flag support. 2024-06-24 20:56:47 +02:00
Zhiyi Zhang
d1a62e862e include: Add some windows.applicationmodel definitions. 2024-06-24 17:13:05 +02:00
Zhiyi Zhang
c165459699 include: Add some windows.ui.core definitions. 2024-06-24 17:13:05 +02:00
Zhiyi Zhang
425ef9cb23 include: Add windows.ui.input.idl. 2024-06-24 17:13:05 +02:00
Zhiyi Zhang
cd8306db83 include: Add windows.devices.input.idl. 2024-06-24 17:13:05 +02:00
Zhiyi Zhang
d010f52241 include: Add some windows.system definitions. 2024-06-24 17:13:05 +02:00
Zhiyi Zhang
b80657c0a5 include: Add some windows.foundation definitions. 2024-06-24 17:13:05 +02:00
Zhiyi Zhang
cbf1310f87 rometadata: Add initial dll. 2024-06-24 17:13:05 +02:00
Alistair Leslie-Hughes
c483e5d456 msado15: Implement _Recordset get/put MaxRecords. 2024-06-24 17:13:05 +02:00
Alistair Leslie-Hughes
794e1f1884 msado15: Implement _Recordset get/put CacheSize. 2024-06-24 17:13:05 +02:00
Torge Matthies
9dd9c455d3 winegstreamer: Handle Gstreamer pipeline flushes gracefully in the media source.
If a GST_EVENT_FLUSH_START event is received between the calls from PE code to wg_parser_stream_get_buffer
and wg_parser_stream_copy_buffer, the latter function will return an error, resulting in the sample request being
dropped without having delivered a sample.

If wg_parser_stream_copy_buffer returns an error, retry the whole wait_on_sample procedure.

Flushes can be triggered by seek operations.
2024-06-24 17:13:05 +02:00
Torge Matthies
62d8d3415c winegstreamer: Ignore an assert in wg_parser.
This gets hit when a wg_parser receives GST_EVENT_FLUSH_START between the wg_parser_stream_get_buffer function return
and the wg_parser_stream_release_buffer call. In this case the NULL buffer can be ignored, it does no harm and there
is no memory leak from this.
2024-06-24 17:13:05 +02:00
Torge Matthies
215478fc46 winegstreamer: Don't only accept segment events when streams are enabled.
I don't know why this was done previously but this just creates a race condition, with no to me apparent benefit.
2024-06-24 17:13:05 +02:00
Torge Matthies
490d8ed663 winegstreamer: Fix race between wg_parser_stream_en/disable and GST_EVENT_FLUSH_START/STOP. 2024-06-24 17:13:05 +02:00
Alexandre Julliard
7c0aa6fd8c makefiles: Generate rules to build makedep. 2024-06-24 17:13:05 +02:00
Alexandre Julliard
0fb9e616bc makefiles: Hardcode the dll directory.
It's Wine-specific anyway.
2024-06-24 15:21:42 +02:00
Alexandre Julliard
f0ee51026b makefiles: Hardcode the nls directory.
It's Wine-specific anyway.
2024-06-24 13:47:08 +02:00
Alexandre Julliard
13159b0767 makefiles: Hardcode the fonts directory.
It's Wine-specific anyway.
2024-06-24 13:46:40 +02:00
Alexandre Julliard
58de2dec08 makedep: Add a helper to get a root-relative directory path. 2024-06-24 13:39:49 +02:00
Rémi Bernon
ef7f9fed60 winewayland: Move window surface creation functions to window_surface.c. 2024-06-24 13:25:28 +02:00
Rémi Bernon
834da273c1 winemac: Move window surface creation functions to surface.c. 2024-06-24 13:25:28 +02:00
Rémi Bernon
e9ca13a6f7 winex11: Move window surface creation functions to bitblt.c. 2024-06-24 13:25:28 +02:00
Eric Pouech
2f5456316c cmd: Move depth count inside builder.
(and temporarly using parenthesis count to store curDepth).

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-06-24 13:24:06 +02:00
Eric Pouech
fc4b9c645a cmd: Fix a couple of issues wrt. variable expansion.
Ensure expansion at parse time is only done once.
Simply handleExpansion() code.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-06-24 13:24:05 +02:00
Eric Pouech
3a8aad4834 cmd: Move prompt handling into line reading.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-06-24 13:24:04 +02:00
Eric Pouech
f45588c57f cmd: Remove unrelated parameter to WCMD_show_prompt.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-06-24 13:24:03 +02:00
Eric Pouech
8ad0923515 cmd: Factorize code for reading a new line for parser.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-06-24 13:24:02 +02:00
Davide Beatrici
b34b5d84a6 mmdevapi: Implement IAudioClient3_GetCurrentSharedModeEnginePeriod. 2024-06-24 13:23:31 +02:00
Davide Beatrici
235d527fa5 mmdevapi: Complete IAudioClient3_GetSharedModeEnginePeriod. 2024-06-24 13:23:31 +02:00
Davide Beatrici
9d046996cb mmdevapi: Complete IAudioClient3_InitializeSharedAudioStream. 2024-06-24 13:23:31 +02:00
Davide Beatrici
73a501ab46 mmdevapi: Introduce helper stream_init(). 2024-06-24 13:23:31 +02:00
Davide Beatrici
5dcb879df1 mmdevapi: Return errors early in adjust_timing(). 2024-06-24 13:23:31 +02:00
Alex Henrie
7053e0f641 ntdll: Don't special-case default values in RtlQueryRegistryValues.
Additional tests reveal that RTL_QUERY_REGISTRY_DIRECT does work with
non-string default values, it just requires a pointer to the value and
it doesn't infer the size automatically. That means that the same code
can be used to handle both default and non-default values.
2024-06-24 13:23:19 +02:00
Aida Jonikienė
5eafe53e54 ntdll: Fix params_mask type in NtRaiseHardError().
Real-world app testing reveals that parameter isn't used as a
pointer (so change it to an integer).
2024-06-24 13:22:53 +02:00
Elizabeth Figura
0db0f6180d ntdll: Use file_complete_async() in NtFsControlFile(). 2024-06-24 13:19:57 +02:00
Elizabeth Figura
0a42bd290d ntdll: Use file_complete_async() in serial_DeviceIoControl().
Thereby also handling completion and APCs.
2024-06-24 13:19:56 +02:00
Elizabeth Figura
c133f14fe6 ntdll: Use file_complete_async() in cdrom_DeviceIoControl().
Thereby also handling completion and APCs.
2024-06-24 13:19:54 +02:00
Elizabeth Figura
d140164d76 ntdll: Use file_complete_async() in tape_DeviceIoControl().
Thereby also handling completion and APCs.
2024-06-24 13:19:52 +02:00
Elizabeth Figura
7e3293107f ntdll: Move complete_async() to file.c and use it in NtWriteFileGather(). 2024-06-24 13:19:52 +02:00
Elizabeth Figura
8fee7e8b7c ntdll: Do not queue an IOCP packet in complete_async() if an APC routine is specified. 2024-06-24 13:19:52 +02:00
Vijay Kiran Kamuju
2a6e7ab4ed ntdll: Add stub RtlNumberGenericTableElementsAvl function.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56839
2024-06-24 13:19:21 +02:00
Vijay Kiran Kamuju
1d58a4674c ntdll: Add stub RtlEnumerateGenericTableWithoutSplayingAvl function.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56839
2024-06-24 13:19:19 +02:00
Vijay Kiran Kamuju
32e2ede0df ntdll: Fix RtlEnumerateGenericTableWithoutSplaying function parameters. 2024-06-24 13:19:17 +02:00
chenjiangyi
5235686be0 ntdll: Support Ctrl-C stop debuggee and attach 32-bit process in wow64 mode.
Signed-off-by: chenjiangyi <chenjiangyi@uniontech.com>
2023-11-05 17:13:16 +08:00
68 changed files with 3566 additions and 906 deletions

33
configure vendored
View File

@ -868,9 +868,6 @@ CFLAGS
CC
SET_MAKE
srcdir
nlsdir
fontdir
dlldir
host_os
host_vendor
host_cpu
@ -1390,6 +1387,7 @@ enable_regapi
enable_resutils
enable_riched20
enable_riched32
enable_rometadata
enable_rpcrt4
enable_rsabase
enable_rsaenh
@ -4676,12 +4674,6 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
dlldir=\${libdir}/wine
fontdir=\${datadir}/wine/fonts
nlsdir=\${datadir}/wine/nls
@ -6476,7 +6468,7 @@ MAKEDEP=$wine_makedep
RUNTESTFLAGS="-q -P wine"
SED_CMD="LC_ALL=C sed -e 's,@bindir@,\${bindir},g' -e 's,@dlldir@,\${dlldir},g' -e 's,@PACKAGE_STRING@,$PACKAGE_STRING,g' -e 's,@PACKAGE_VERSION@,$PACKAGE_VERSION,g'"
SED_CMD="LC_ALL=C sed -e 's,@bindir@,\${bindir},g' -e 's,@PACKAGE_STRING@,$PACKAGE_STRING,g' -e 's,@PACKAGE_VERSION@,$PACKAGE_VERSION,g'"
if test -n "$host_alias" -a "$host_alias" != "$build_alias"
@ -22586,6 +22578,8 @@ wine_fn_config_makefile dlls/riched20 enable_riched20
wine_fn_config_makefile dlls/riched20/tests enable_tests
wine_fn_config_makefile dlls/riched32 enable_riched32
wine_fn_config_makefile dlls/riched32/tests enable_tests
wine_fn_config_makefile dlls/rometadata enable_rometadata
wine_fn_config_makefile dlls/rometadata/tests enable_tests
wine_fn_config_makefile dlls/rpcrt4 enable_rpcrt4
wine_fn_config_makefile dlls/rpcrt4/tests enable_tests
wine_fn_config_makefile dlls/rsabase enable_rsabase
@ -23109,7 +23103,6 @@ test "$wine_binary" = wine || as_fn_append CONFIGURE_TARGETS " loader/wine"
if test "x$enable_tools" != xno
then
as_fn_append CONFIGURE_TARGETS " tools/makedep$ac_exeext"
ac_config_commands="$ac_config_commands tools/makedep"
fi
@ -23151,18 +23144,6 @@ include/stamp-h.in: configure.ac aclocal.m4
@echo timestamp > \$@"
fi
if test "x$enable_tools" != xno
then
as_fn_append wine_rules "
tools/makedep$ac_exeext: ${wine_srcdir}tools/makedep.c include/config.h config.status
@./config.status tools/makedep
Makefile: tools/makedep$ac_exeext"
else
as_fn_append wine_rules "
\$(MAKEDEP):
@echo \"You need to run make in $toolsdir first\" && false"
fi
if test -n "$with_wine64"
then
@ -23914,7 +23895,8 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
wine_fn_output_makedep ()
{
as_dir=tools; as_fn_mkdir_p
$CC -I${wine_srcdir}tools -Iinclude -I${wine_srcdir}include -D__WINESRC__ -DWINE_UNIX_LIB $EXTRACFLAGS $CPPFLAGS $CFLAGS -o tools/makedep$ac_exeext ${wine_srcdir}tools/makedep.c $LDFLAGS
$CC -c -I${wine_srcdir}tools -Iinclude -I${wine_srcdir}include -D__WINESRC__ -DWINE_UNIX_LIB $EXTRACFLAGS $CPPFLAGS $CFLAGS -o tools/makedep.o ${wine_srcdir}tools/makedep.c
$CC -o tools/makedep$ac_exeext tools/makedep.o $LDFLAGS
}
wine_fn_output_makefile ()
{
@ -23981,9 +23963,6 @@ host = $host
host_cpu = $host_cpu
host_vendor = $host_vendor
host_os = $host_os
dlldir = $dlldir
fontdir = $fontdir
nlsdir = $nlsdir
srcdir = $srcdir
SET_MAKE = $SET_MAKE
CC = $CC

View File

@ -91,9 +91,6 @@ AC_ARG_WITH(wine64, AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine i
AC_CANONICAL_HOST
AC_SUBST(dlldir,[\${libdir}/wine])
AC_SUBST(fontdir,[\${datadir}/wine/fonts])
AC_SUBST(nlsdir,[\${datadir}/wine/nls])
AC_SUBST(srcdir)
dnl **** Check for some programs ****
@ -198,7 +195,7 @@ fi
AC_SUBST(toolsdir,[$wine_cv_toolsdir])
AC_SUBST(MAKEDEP,[$wine_makedep])
AC_SUBST(RUNTESTFLAGS,["-q -P wine"])
AC_SUBST(SED_CMD,["LC_ALL=C sed -e 's,@bindir@,\${bindir},g' -e 's,@dlldir@,\${dlldir},g' -e 's,@PACKAGE_STRING@,$PACKAGE_STRING,g' -e 's,@PACKAGE_VERSION@,$PACKAGE_VERSION,g'"])
AC_SUBST(SED_CMD,["LC_ALL=C sed -e 's,@bindir@,\${bindir},g' -e 's,@PACKAGE_STRING@,$PACKAGE_STRING,g' -e 's,@PACKAGE_VERSION@,$PACKAGE_VERSION,g'"])
if test -n "$host_alias" -a "$host_alias" != "$build_alias"
then
@ -3064,6 +3061,8 @@ WINE_CONFIG_MAKEFILE(dlls/riched20)
WINE_CONFIG_MAKEFILE(dlls/riched20/tests)
WINE_CONFIG_MAKEFILE(dlls/riched32)
WINE_CONFIG_MAKEFILE(dlls/riched32/tests)
WINE_CONFIG_MAKEFILE(dlls/rometadata)
WINE_CONFIG_MAKEFILE(dlls/rometadata/tests)
WINE_CONFIG_MAKEFILE(dlls/rpcrt4)
WINE_CONFIG_MAKEFILE(dlls/rpcrt4/tests)
WINE_CONFIG_MAKEFILE(dlls/rsabase)
@ -3589,12 +3588,12 @@ test "$wine_binary" = wine || WINE_IGNORE_FILE(loader/wine)
if test "x$enable_tools" != xno
then
WINE_IGNORE_FILE(tools/makedep$ac_exeext)
AC_CONFIG_COMMANDS([tools/makedep],[wine_fn_output_makedep || AS_EXIT],
[wine_fn_output_makedep ()
{
AS_MKDIR_P(tools)
$CC -I${wine_srcdir}tools -Iinclude -I${wine_srcdir}include -D__WINESRC__ -DWINE_UNIX_LIB $EXTRACFLAGS $CPPFLAGS $CFLAGS -o tools/makedep$ac_exeext ${wine_srcdir}tools/makedep.c $LDFLAGS
$CC -c -I${wine_srcdir}tools -Iinclude -I${wine_srcdir}include -D__WINESRC__ -DWINE_UNIX_LIB $EXTRACFLAGS $CPPFLAGS $CFLAGS -o tools/makedep.o ${wine_srcdir}tools/makedep.c
$CC -o tools/makedep$ac_exeext tools/makedep.o $LDFLAGS
}])
fi
@ -3658,18 +3657,6 @@ include/stamp-h.in: configure.ac aclocal.m4
@echo timestamp > \$[@]])
fi
if test "x$enable_tools" != xno
then
WINE_APPEND_RULE(
[tools/makedep$ac_exeext: ${wine_srcdir}tools/makedep.c include/config.h config.status
@./config.status tools/makedep
Makefile: tools/makedep$ac_exeext])
else
WINE_APPEND_RULE(
[\$(MAKEDEP):
@echo \"You need to run make in $toolsdir first\" && false])
fi
dnl Rules for wineloader
if test -n "$with_wine64"

View File

@ -117,7 +117,7 @@ static HRESULT get_periods(struct audio_client *client,
return params.result;
}
static HRESULT adjust_timing(struct audio_client *client,
static HRESULT adjust_timing(struct audio_client *client, const BOOLEAN force_def_period,
REFERENCE_TIME *duration, REFERENCE_TIME *period,
const AUDCLNT_SHAREMODE mode, const DWORD flags,
const WAVEFORMATEX *fmt)
@ -133,28 +133,31 @@ static HRESULT adjust_timing(struct audio_client *client,
TRACE("Device periods: %lu default and %lu minimum\n", (ULONG)def_period, (ULONG)min_period);
if (mode == AUDCLNT_SHAREMODE_SHARED) {
*period = def_period;
if (*period == 0 || force_def_period)
*period = def_period;
else if (*period < min_period)
return AUDCLNT_E_INVALID_DEVICE_PERIOD;
if (*duration < 3 * *period)
*duration = 3 * *period;
} else {
const WAVEFORMATEXTENSIBLE *fmtex = (WAVEFORMATEXTENSIBLE *)fmt;
if (fmtex->Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
(fmtex->dwChannelMask == 0 || fmtex->dwChannelMask & SPEAKER_RESERVED))
hr = AUDCLNT_E_UNSUPPORTED_FORMAT;
return AUDCLNT_E_UNSUPPORTED_FORMAT;
else {
if (*period == 0)
*period = def_period;
if (*period < min_period || *period > 5000000)
hr = AUDCLNT_E_INVALID_DEVICE_PERIOD;
return AUDCLNT_E_INVALID_DEVICE_PERIOD;
else if (*duration > 20000000) /* The smaller the period, the lower this limit. */
hr = AUDCLNT_E_BUFFER_SIZE_ERROR;
return AUDCLNT_E_BUFFER_SIZE_ERROR;
else if (flags & AUDCLNT_STREAMFLAGS_EVENTCALLBACK) {
if (*duration != *period)
hr = AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL;
return AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL;
FIXME("EXCLUSIVE mode with EVENTCALLBACK\n");
hr = AUDCLNT_E_DEVICE_IN_USE;
return AUDCLNT_E_DEVICE_IN_USE;
} else if (*duration < 8 * *period)
*duration = 8 * *period; /* May grow above 2s. */
}
@ -355,6 +358,100 @@ skip:
return wcsdup(name);
}
static HRESULT stream_init(struct audio_client *client, const BOOLEAN force_def_period,
const AUDCLNT_SHAREMODE mode, const DWORD flags,
REFERENCE_TIME duration, REFERENCE_TIME period,
const WAVEFORMATEX *fmt, const GUID *sessionguid)
{
struct create_stream_params params;
UINT32 i, channel_count;
stream_handle stream;
WCHAR *name;
if (!fmt)
return E_POINTER;
dump_fmt(fmt);
if (mode != AUDCLNT_SHAREMODE_SHARED && mode != AUDCLNT_SHAREMODE_EXCLUSIVE)
return E_INVALIDARG;
if (flags & ~(AUDCLNT_STREAMFLAGS_CROSSPROCESS |
AUDCLNT_STREAMFLAGS_LOOPBACK |
AUDCLNT_STREAMFLAGS_EVENTCALLBACK |
AUDCLNT_STREAMFLAGS_NOPERSIST |
AUDCLNT_STREAMFLAGS_RATEADJUST |
AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED |
AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE |
AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED |
AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY |
AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM)) {
FIXME("Unknown flags: %08lx\n", flags);
return E_INVALIDARG;
}
if (FAILED(params.result = adjust_timing(client, force_def_period, &duration, &period, mode, flags, fmt)))
return params.result;
sessions_lock();
if (client->stream) {
sessions_unlock();
return AUDCLNT_E_ALREADY_INITIALIZED;
}
if (FAILED(params.result = main_loop_start())) {
sessions_unlock();
return params.result;
}
params.name = name = get_application_name();
params.device = client->device_name;
params.flow = client->dataflow;
params.share = mode;
params.flags = flags;
params.duration = duration;
params.period = period;
params.fmt = fmt;
params.channel_count = &channel_count;
params.stream = &stream;
wine_unix_call(create_stream, &params);
free(name);
if (FAILED(params.result)) {
sessions_unlock();
return params.result;
}
if (!(client->vols = malloc(channel_count * sizeof(*client->vols)))) {
params.result = E_OUTOFMEMORY;
goto exit;
}
for (i = 0; i < channel_count; i++)
client->vols[i] = 1.f;
params.result = get_audio_session(sessionguid, client->parent, channel_count, &client->session);
exit:
if (FAILED(params.result)) {
stream_release(stream, NULL);
free(client->vols);
client->vols = NULL;
} else {
list_add_tail(&client->session->clients, &client->entry);
client->stream = stream;
client->channel_count = channel_count;
set_stream_volumes(client);
}
sessions_unlock();
return params.result;
}
static HRESULT WINAPI capture_QueryInterface(IAudioCaptureClient *iface, REFIID riid, void **ppv)
{
struct audio_client *This = impl_from_IAudioCaptureClient(iface);
@ -537,97 +634,12 @@ static HRESULT WINAPI client_Initialize(IAudioClient3 *iface, AUDCLNT_SHAREMODE
const WAVEFORMATEX *fmt, const GUID *sessionguid)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
struct create_stream_params params;
UINT32 i, channel_count;
stream_handle stream;
WCHAR *name;
TRACE("(%p)->(%x, %lx, %s, %s, %p, %s)\n", This, mode, flags, wine_dbgstr_longlong(duration),
wine_dbgstr_longlong(period), fmt,
debugstr_guid(sessionguid));
if (!fmt)
return E_POINTER;
dump_fmt(fmt);
if (mode != AUDCLNT_SHAREMODE_SHARED && mode != AUDCLNT_SHAREMODE_EXCLUSIVE)
return E_INVALIDARG;
if (flags & ~(AUDCLNT_STREAMFLAGS_CROSSPROCESS |
AUDCLNT_STREAMFLAGS_LOOPBACK |
AUDCLNT_STREAMFLAGS_EVENTCALLBACK |
AUDCLNT_STREAMFLAGS_NOPERSIST |
AUDCLNT_STREAMFLAGS_RATEADJUST |
AUDCLNT_SESSIONFLAGS_EXPIREWHENUNOWNED |
AUDCLNT_SESSIONFLAGS_DISPLAY_HIDE |
AUDCLNT_SESSIONFLAGS_DISPLAY_HIDEWHENEXPIRED |
AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY |
AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM)) {
FIXME("Unknown flags: %08lx\n", flags);
return E_INVALIDARG;
}
if (FAILED(params.result = adjust_timing(This, &duration, &period, mode, flags, fmt)))
return params.result;
sessions_lock();
if (This->stream) {
sessions_unlock();
return AUDCLNT_E_ALREADY_INITIALIZED;
}
if (FAILED(params.result = main_loop_start())) {
sessions_unlock();
return params.result;
}
params.name = name = get_application_name();
params.device = This->device_name;
params.flow = This->dataflow;
params.share = mode;
params.flags = flags;
params.duration = duration;
params.period = period;
params.fmt = fmt;
params.channel_count = &channel_count;
params.stream = &stream;
wine_unix_call(create_stream, &params);
free(name);
if (FAILED(params.result)) {
sessions_unlock();
return params.result;
}
if (!(This->vols = malloc(channel_count * sizeof(*This->vols)))) {
params.result = E_OUTOFMEMORY;
goto exit;
}
for (i = 0; i < channel_count; i++)
This->vols[i] = 1.f;
params.result = get_audio_session(sessionguid, This->parent, channel_count, &This->session);
exit:
if (FAILED(params.result)) {
stream_release(stream, NULL);
free(This->vols);
This->vols = NULL;
} else {
list_add_tail(&This->session->clients, &This->entry);
This->stream = stream;
This->channel_count = channel_count;
set_stream_volumes(This);
}
sessions_unlock();
return params.result;
return stream_init(This, TRUE, mode, flags, duration, period, fmt, sessionguid);
}
static HRESULT WINAPI client_GetBufferSize(IAudioClient3 *iface, UINT32 *out)
@ -990,17 +1002,23 @@ static HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface,
UINT32 *max_period_frames)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
FIXME("(%p)->(%p, %p, %p, %p, %p) - partial stub\n",
REFERENCE_TIME def_period, min_period;
HRESULT hr;
TRACE("(%p)->(%p, %p, %p, %p, %p)\n",
This, format, default_period_frames,
unit_period_frames, min_period_frames,
max_period_frames);
*default_period_frames =
*min_period_frames =
*max_period_frames =
format->nSamplesPerSec / 100; /* ~10ms */
*unit_period_frames = 1;
return S_OK;
if (FAILED(hr = get_periods(This, &def_period, &min_period)))
return hr;
*default_period_frames = def_period * format->nSamplesPerSec / (REFERENCE_TIME)10000000;
*min_period_frames = min_period * format->nSamplesPerSec / (REFERENCE_TIME)10000000;
*max_period_frames = *default_period_frames;
*unit_period_frames = 1;
return hr;
}
static HRESULT WINAPI client_GetCurrentSharedModeEnginePeriod(IAudioClient3 *iface,
@ -1008,8 +1026,18 @@ static HRESULT WINAPI client_GetCurrentSharedModeEnginePeriod(IAudioClient3 *ifa
UINT32 *cur_period_frames)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
FIXME("(%p)->(%p, %p) - stub\n", This, cur_format, cur_period_frames);
return E_NOTIMPL;
UINT32 dummy;
HRESULT hr;
TRACE("(%p)->(%p, %p)\n", This, cur_format, cur_period_frames);
if (!cur_format || !cur_period_frames)
return E_POINTER;
if (FAILED(hr = client_GetMixFormat(iface, cur_format)))
return hr;
return client_GetSharedModeEnginePeriod(iface, *cur_format, cur_period_frames, &dummy, &dummy, &dummy);
}
static HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface, DWORD flags,
@ -1018,14 +1046,16 @@ static HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface, D
const GUID *session_guid)
{
struct audio_client *This = impl_from_IAudioClient3(iface);
REFERENCE_TIME duration;
FIXME("(%p)->(0x%lx, %u, %p, %s) - partial stub\n", This, flags, period_frames, format, debugstr_guid(session_guid));
REFERENCE_TIME period;
TRACE("(%p)->(0x%lx, %u, %p, %s)\n", This, flags, period_frames, format, debugstr_guid(session_guid));
if (!format)
return E_POINTER;
duration = period_frames * (REFERENCE_TIME)10000000 / format->nSamplesPerSec;
return client_Initialize(iface, AUDCLNT_SHAREMODE_SHARED, flags, duration, 0, format, session_guid);
period = period_frames * (REFERENCE_TIME)10000000 / format->nSamplesPerSec;
return stream_init(This, FALSE, AUDCLNT_SHAREMODE_SHARED, flags, 0, period, format, session_guid);
}
const IAudioClient3Vtbl AudioClient3_Vtbl =

View File

@ -50,6 +50,8 @@ struct recordset
CursorTypeEnum cursor_type;
IRowset *row_set;
EditModeEnum editmode;
LONG cache_size;
ADO_LONGPTR max_records;
VARIANT filter;
DBTYPE *columntypes;
@ -1449,14 +1451,20 @@ static HRESULT WINAPI recordset_put_Bookmark( _Recordset *iface, VARIANT bookmar
static HRESULT WINAPI recordset_get_CacheSize( _Recordset *iface, LONG *size )
{
FIXME( "%p, %p\n", iface, size );
return E_NOTIMPL;
struct recordset *recordset = impl_from_Recordset( iface );
TRACE( "%p, %p\n", iface, size );
*size = recordset->cache_size;
return S_OK;
}
static HRESULT WINAPI recordset_put_CacheSize( _Recordset *iface, LONG size )
{
FIXME( "%p, %ld\n", iface, size );
return E_NOTIMPL;
struct recordset *recordset = impl_from_Recordset( iface );
TRACE( "%p, %ld\n", iface, size );
recordset->cache_size = size;
return S_OK;
}
static HRESULT WINAPI recordset_get_CursorType( _Recordset *iface, CursorTypeEnum *cursor_type )
@ -1525,14 +1533,20 @@ static HRESULT WINAPI recordset_put_LockType( _Recordset *iface, LockTypeEnum lo
static HRESULT WINAPI recordset_get_MaxRecords( _Recordset *iface, ADO_LONGPTR *max_records )
{
FIXME( "%p, %p\n", iface, max_records );
return E_NOTIMPL;
struct recordset *recordset = impl_from_Recordset( iface );
TRACE( "%p, %p\n", iface, max_records );
*max_records = recordset->max_records;
return S_OK;
}
static HRESULT WINAPI recordset_put_MaxRecords( _Recordset *iface, ADO_LONGPTR max_records )
{
FIXME( "%p, %Id\n", iface, max_records );
return E_NOTIMPL;
struct recordset *recordset = impl_from_Recordset( iface );
TRACE( "%p, %Id\n", iface, max_records );
recordset->max_records = max_records;
return S_OK;
}
static HRESULT WINAPI recordset_get_RecordCount( _Recordset *iface, ADO_LONGPTR *count )
@ -2792,6 +2806,8 @@ HRESULT Recordset_create( void **obj )
recordset->cursor_type = adOpenForwardOnly;
recordset->row_set = NULL;
recordset->editmode = adEditNone;
recordset->cache_size = 1;
recordset->max_records = 0;
VariantInit( &recordset->filter );
recordset->columntypes = NULL;
recordset->haccessors = NULL;

View File

@ -53,7 +53,7 @@ static void test_Recordset(void)
Properties *props;
Property *prop;
LONG count, state;
ADO_LONGPTR rec_count;
ADO_LONGPTR rec_count, max_records;
VARIANT missing, val, index;
CursorLocationEnum location;
CursorTypeEnum cursor;
@ -61,6 +61,7 @@ static void test_Recordset(void)
HRESULT hr;
VARIANT bookmark, filter, active;
EditModeEnum editmode;
LONG cache_size;
hr = CoCreateInstance( &CLSID_Recordset, NULL, CLSCTX_INPROC_SERVER, &IID__Recordset, (void **)&recordset );
ok( hr == S_OK, "got %08lx\n", hr );
@ -111,6 +112,36 @@ static void test_Recordset(void)
ok( hr == S_OK, "got %08lx\n", hr );
ok( cursor == adOpenForwardOnly, "got %d\n", cursor );
cache_size = 0;
hr = _Recordset_get_CacheSize( recordset, &cache_size );
ok( hr == S_OK, "got %08lx\n", hr );
ok( cache_size == 1, "got %ld\n", cache_size );
hr = _Recordset_put_CacheSize( recordset, 5 );
ok( hr == S_OK, "got %08lx\n", hr );
hr = _Recordset_get_CacheSize( recordset, &cache_size );
ok( hr == S_OK, "got %08lx\n", hr );
ok( cache_size == 5, "got %ld\n", cache_size );
hr = _Recordset_put_CacheSize( recordset, 1 );
ok( hr == S_OK, "got %08lx\n", hr );
max_records = 0;
hr = _Recordset_get_MaxRecords( recordset, &max_records );
ok( hr == S_OK, "got %08lx\n", hr );
ok( max_records == 0, "got %Id\n", max_records );
hr = _Recordset_put_MaxRecords( recordset, 5 );
ok( hr == S_OK, "got %08lx\n", hr );
hr = _Recordset_get_MaxRecords( recordset, &max_records );
ok( hr == S_OK, "got %08lx\n", hr );
ok( max_records == 5, "got %Id\n", max_records );
hr = _Recordset_put_MaxRecords( recordset, 0 );
ok( hr == S_OK, "got %08lx\n", hr );
editmode = -1;
hr = _Recordset_get_EditMode( recordset, &editmode );
ok( hr == MAKE_ADO_HRESULT( adErrObjectClosed ), "got %08lx\n", hr );

View File

@ -4739,8 +4739,18 @@ static HRESULT WINAPI MarkupServices_CreateMarkupPointer(IMarkupServices *iface,
static HRESULT WINAPI MarkupServices_CreateMarkupContainer(IMarkupServices *iface, IMarkupContainer **ppMarkupContainer)
{
HTMLDocumentNode *This = impl_from_IMarkupServices(iface);
FIXME("(%p)->(%p)\n", This, ppMarkupContainer);
return E_NOTIMPL;
IHTMLDocument2 *frag;
HRESULT hres;
TRACE("(%p)->(%p)\n", This, ppMarkupContainer);
hres = IHTMLDocument3_createDocumentFragment(&This->IHTMLDocument3_iface, &frag);
if(FAILED(hres))
return hres;
IHTMLDocument2_QueryInterface(frag, &IID_IMarkupContainer, (void**)ppMarkupContainer);
IHTMLDocument2_Release(frag);
return S_OK;
}
static HRESULT WINAPI MarkupServices_CreateElement(IMarkupServices *iface,
@ -4813,9 +4823,53 @@ static HRESULT WINAPI MarkupServices_ParseString(IMarkupServices *iface,
OLECHAR *pchHTML, DWORD dwFlags, IMarkupContainer **ppContainerResult,
IMarkupPointer *pPointerStart, IMarkupPointer *pPointerFinish)
{
HRESULT hres;
IMarkupContainer *container;
IHTMLDocument2 *doc;
IHTMLDOMNode *node, *html_node, *new_html_node = NULL;
IHTMLElement *html, *body;
HTMLDocumentNode *This = impl_from_IMarkupServices(iface);
FIXME("(%p)->(%s,%lx,%p,%p,%p)\n", This, debugstr_w(pchHTML), dwFlags, ppContainerResult, pPointerStart, pPointerFinish);
return E_NOTIMPL;
TRACE("(%p)->(%s,%lx,%p,%p,%p)\n", This, debugstr_w(pchHTML), dwFlags, ppContainerResult, pPointerStart, pPointerFinish);
if(dwFlags != 0)
FIXME("flags %lx not implemented.\n", dwFlags);
if(pPointerStart || pPointerFinish) {
FIXME("Pointers not implemented.\n");
return E_NOTIMPL;
}
hres = IMarkupServices_CreateMarkupContainer(iface, &container);
if(FAILED(hres))
return hres;
IMarkupContainer_QueryInterface(container, &IID_IHTMLDocument2, (void**)&doc);
IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDOMNode, (void**)&node);
IHTMLDocument2_createElement(&This->IHTMLDocument2_iface, (BSTR)L"html", &html);
IHTMLElement_put_innerHTML(html, (BSTR)L"<head><title></title></head><body></body>");
IHTMLElement_QueryInterface(html, &IID_IHTMLDOMNode, (void**)&html_node);
IHTMLElement_Release(html);
IHTMLDOMNode_appendChild(node, html_node, &new_html_node);
IHTMLDOMNode_Release(node);
IHTMLDOMNode_Release(html_node);
IHTMLDOMNode_Release(new_html_node);
IHTMLDocument2_get_body(doc, &body);
hres = IHTMLElement_put_innerHTML(body, pchHTML);
if (FAILED(hres))
{
ERR("Failed put_innerHTML hr %#lx\n", hres);
IMarkupContainer_Release(container);
container = NULL;
}
IHTMLDocument2_Release(doc);
IHTMLElement_Release(body);
*ppContainerResult = container;
return hres;
}
static HRESULT WINAPI MarkupServices_ParseGlobal(IMarkupServices *iface,

View File

@ -8358,6 +8358,121 @@ static void test_MHTMLDocument(void)
release_document(doc);
}
static LONG get_document_elements_count(IHTMLDocument2 *doc)
{
LONG elements_count;
IHTMLElementCollection *elements = NULL;
IHTMLDocument2_get_all(doc, &elements);
IHTMLElementCollection_get_length(elements, &elements_count);
IHTMLElementCollection_Release(elements);
return elements_count;
}
static void test_MarkupContainer(IMarkupServices *markup_services)
{
IHTMLDOMNode *doc_node;
IHTMLDocument2 *markup_container_doc;
ITargetContainer *target_container_doc;
IInternetSecurityManager *sec_manager;
IMarkupContainer *container = NULL;
ICustomDoc *custom_doc;
IHTMLLocation *location = NULL;
IHTMLElement *body = NULL;
LONG elements_count;
HRESULT hres;
hres = IMarkupServices_CreateMarkupContainer(markup_services, &container);
ok(hres == S_OK, "got 0x%08lx\n", hres);
ok(container != NULL, "MarkupContainer is null.\n");
if (!container) return;
hres = IMarkupContainer_QueryInterface(container, &IID_IHTMLDocument2, (void**)&markup_container_doc);
ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IHTMLDocument2_get_location(markup_container_doc, &location);
ok(hres == E_UNEXPECTED, "expected E_UNEXPECTED, got 0x%08lx\n", hres);
ok(location == NULL, "expected null location\n");
hres = IHTMLDocument2_get_body(markup_container_doc, &body);
ok(hres == S_OK, "got 0x%08lx\n", hres);
ok(body == NULL, "expected null body\n");
elements_count = get_document_elements_count(markup_container_doc);
ok(elements_count == 0, "expected document to not have elements\n");
hres = IMarkupContainer_QueryInterface(container, &IID_IHTMLDOMNode, (void**)&doc_node);
todo_wine ok(hres == E_NOINTERFACE, "expected to fail with E_NOINTERFACE got 0x%08lx\n", hres);
hres = IHTMLDocument2_QueryInterface(markup_container_doc, &IID_IInternetSecurityManager, (void**)&sec_manager);
ok(hres == E_NOINTERFACE, "expected to fail with E_NOINTERFACE got 0x%08lx\n", hres);
hres = IHTMLDocument2_QueryInterface(markup_container_doc, &IID_ITargetContainer, (void**)&target_container_doc);
ok(hres == E_NOINTERFACE, "expected to fail with E_NOINTERFACE got 0x%08lx\n", hres);
hres = IHTMLDocument2_QueryInterface(markup_container_doc, &IID_ICustomDoc, (void**)&custom_doc);
ok(hres == E_NOINTERFACE, "expected to fail with E_NOINTERFACE got 0x%08lx\n", hres);
IHTMLDocument2_Release(markup_container_doc);
IMarkupContainer_Release(container);
}
static void test_MarkupServices_ParseString(IMarkupServices *markup_services, IHTMLDocument2 *doc)
{
HRESULT hres;
LONG document_elements_count, markup_container_elements_count;
IHTMLElement *body;
BSTR inner_text;
IHTMLDocument2 *markup_container_doc = NULL;
IMarkupContainer *markup_container = NULL;
hres = IMarkupServices_ParseString(markup_services, (OLECHAR*)L"<div>Hello World</div>", 0, &markup_container, NULL, NULL);
ok(hres == S_OK, "got 0x%08lx\n", hres);
ok(markup_container != NULL, "MarkupContainer is null.\n");
if (!markup_container) return;
hres = IMarkupContainer_QueryInterface(markup_container, &IID_IHTMLDocument2, (void**)&markup_container_doc);
ok(hres == S_OK, "failed to query interface of MarkupContainer 0x%08lx\n", hres);
markup_container_elements_count = get_document_elements_count(markup_container_doc);
ok(markup_container_elements_count == 5, "expected markup container to have 5 elements but got %ld\n",
markup_container_elements_count);
document_elements_count = get_document_elements_count(doc);
ok(document_elements_count != markup_container_elements_count,
"expected document to not have the same elements count of the markup container %ld == %ld\n",
document_elements_count, markup_container_elements_count);
hres = IHTMLDocument2_get_body(markup_container_doc, &body);
ok(hres == S_OK, "got 0x%08lx\n", hres);
ok(body != NULL, "got null body\n");
hres = IHTMLElement_get_innerText(body, &inner_text);
ok(hres == S_OK, "failed to get inner text error 0x%08lx\n", hres);
ok(inner_text != NULL, "got a null pointer for inner text\n");
ok(!wcscmp(inner_text, L"Hello World"), "strings don't match, got %ls\n", inner_text);
SysFreeString(inner_text);
IHTMLElement_Release(body);
IHTMLDocument2_Release(markup_container_doc);
IMarkupContainer_Release(markup_container);
}
static void test_MarkupServices(IHTMLDocument2 *doc)
{
HRESULT hres;
IMarkupServices *markup_services = NULL;
hres = IHTMLDocument2_QueryInterface(doc, &IID_IMarkupServices, (void**)&markup_services);
ok(hres == S_OK, "got 0x%08lx\n", hres);
test_MarkupContainer(markup_services);
test_MarkupServices_ParseString(markup_services, doc);
IMarkupServices_Release(markup_services);
}
static void test_HTMLDocument_hlink(DWORD status)
{
IHTMLDocument2 *doc;
@ -8524,6 +8639,7 @@ static void test_HTMLDocument_http(BOOL with_wbapp)
test_travellog(doc);
test_binding_ui((IUnknown*)doc);
test_doc_domain(doc);
test_MarkupServices(doc);
nav_url = nav_serv_url = L"http://test.winehq.org/tests/winehq_snapshot/"; /* for valid prev nav_url */
if(support_wbapp) {

View File

@ -76,5 +76,5 @@ EXTRA_OBJS = unix/version.o
unix_loader_EXTRADEFS = \
-DBINDIR=\"${bindir}\" \
-DSYSTEMDLLPATH=\"${system_dllpath}\" \
-DDLL_TO_BINDIR=\"`${MAKEDEP} -R ${dlldir} ${bindir}`\" \
-DDLL_TO_BINDIR=\"`${MAKEDEP} -R ${libdir}/wine ${bindir}`\" \
-DBIN_TO_DATADIR=\"`${MAKEDEP} -R ${bindir} ${datadir}/wine`\"

View File

@ -340,7 +340,7 @@
@ stdcall -syscall NtQueueApcThread(long ptr long long long)
@ stdcall -syscall NtQueueApcThreadEx(long long ptr long long long)
@ stdcall -syscall NtRaiseException(ptr ptr long)
@ stdcall -syscall NtRaiseHardError(long long ptr ptr long ptr)
@ stdcall -syscall NtRaiseHardError(long long long ptr long ptr)
@ stdcall -syscall NtReadFile(long long ptr ptr ptr ptr long ptr ptr)
@ stdcall -syscall NtReadFileScatter(long long ptr ptr ptr ptr long ptr ptr)
# @ stub NtReadRequestData
@ -650,7 +650,7 @@
# @ stub RtlEnumerateGenericTableAvl
# @ stub RtlEnumerateGenericTableLikeADirectory
@ stdcall RtlEnumerateGenericTableWithoutSplaying(ptr ptr)
# @ stub RtlEnumerateGenericTableWithoutSplayingAvl
@ stdcall RtlEnumerateGenericTableWithoutSplayingAvl(ptr ptr)
@ stub RtlEnumerateProperties
@ stdcall RtlEqualComputerName(ptr ptr)
@ stdcall RtlEqualDomainName(ptr ptr)
@ -898,7 +898,7 @@
@ stdcall RtlNtStatusToDosError(long)
@ stdcall RtlNtStatusToDosErrorNoTeb(long)
@ stdcall RtlNumberGenericTableElements(ptr)
# @ stub RtlNumberGenericTableElementsAvl
@ stdcall RtlNumberGenericTableElementsAvl(ptr)
@ stdcall RtlNumberOfClearBits(ptr)
@ stdcall RtlNumberOfSetBits(ptr)
@ stdcall RtlOemStringToUnicodeSize(ptr)
@ -1389,7 +1389,7 @@
@ stdcall -private -syscall ZwQueueApcThread(long ptr long long long) NtQueueApcThread
@ stdcall -private -syscall ZwQueueApcThreadEx(long long ptr long long long) NtQueueApcThreadEx
@ stdcall -private -syscall ZwRaiseException(ptr ptr long) NtRaiseException
@ stdcall -private -syscall ZwRaiseHardError(long long ptr ptr long ptr) NtRaiseHardError
@ stdcall -private -syscall ZwRaiseHardError(long long long ptr long ptr) NtRaiseHardError
@ stdcall -private -syscall ZwReadFile(long long ptr ptr ptr ptr long ptr ptr) NtReadFile
@ stdcall -private -syscall ZwReadFileScatter(long long ptr ptr ptr ptr long ptr ptr) NtReadFileScatter
# @ stub ZwReadRequestData

View File

@ -712,16 +712,6 @@ NTSTATUS WINAPI DbgUiIssueRemoteBreakin( HANDLE process )
status = NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, &attr, process,
DbgUiRemoteBreakin, NULL, 0, 0, 0, 0, NULL );
#ifdef _WIN64
/* FIXME: hack for debugging 32-bit wow64 process without a 64-bit ntdll */
if (status == STATUS_INVALID_PARAMETER)
{
ULONG_PTR wow;
if (!NtQueryInformationProcess( process, ProcessWow64Information, &wow, sizeof(wow), NULL ) && wow)
status = NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, &attr, process,
(void *)0x7ffe1000, NULL, 0, 0, 0, 0, NULL );
}
#endif
if (!status) NtClose( handle );
return status;
}

View File

@ -243,58 +243,59 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo,
PRTL_QUERY_REGISTRY_TABLE pQuery, PVOID pContext, PVOID pEnvironment)
{
PUNICODE_STRING str = pQuery->EntryContext;
ULONG type, len, offset, count, res;
UNICODE_STRING src, dst;
WCHAR *data, *wstr;
LONG *bin;
ULONG offset;
PWSTR wstr;
DWORD res;
NTSTATUS status = STATUS_SUCCESS;
ULONG len;
if (pInfo == NULL)
if (pInfo)
{
ULONG default_size = pQuery->DefaultLength;
if (!default_size && pQuery->DefaultType == REG_SZ && pQuery->DefaultData)
default_size = (wcslen(pQuery->DefaultData) + 1) * sizeof(WCHAR);
if (pQuery->Flags & RTL_QUERY_REGISTRY_DIRECT)
{
if (pQuery->QueryRoutine)
return STATUS_INVALID_PARAMETER;
if (pQuery->DefaultType == REG_SZ || pQuery->DefaultType == REG_EXPAND_SZ ||
pQuery->DefaultType == REG_MULTI_SZ || pQuery->DefaultType == REG_LINK)
{
if (!pQuery->DefaultData)
return STATUS_DATA_OVERRUN;
if (str->MaximumLength < default_size)
return STATUS_BUFFER_TOO_SMALL;
memcpy(str->Buffer, pQuery->DefaultData, default_size);
str->Length = default_size - sizeof(WCHAR);
}
return STATUS_SUCCESS;
}
else if (pQuery->QueryRoutine)
{
status = pQuery->QueryRoutine(pQuery->Name, pQuery->DefaultType, pQuery->DefaultData,
default_size, pContext, pQuery->EntryContext);
}
return status;
type = pInfo->Type;
data = (WCHAR*)((char*)pInfo + pInfo->DataOffset);
len = pInfo->DataLength;
}
else
{
type = pQuery->DefaultType;
data = pQuery->DefaultData;
len = pQuery->DefaultLength;
if (!data)
return STATUS_DATA_OVERRUN;
if (!len)
{
switch (type)
{
case REG_SZ:
case REG_EXPAND_SZ:
case REG_LINK:
len = (wcslen(data) + 1) * sizeof(WCHAR);
break;
case REG_MULTI_SZ:
for (wstr = data; *wstr; wstr += count)
{
count = wcslen(wstr) + 1;
len += count * sizeof(WCHAR);
}
break;
}
}
}
len = pInfo->DataLength;
if (pQuery->Flags & RTL_QUERY_REGISTRY_DIRECT)
{
if (pQuery->QueryRoutine)
return STATUS_INVALID_PARAMETER;
switch(pInfo->Type)
switch (type)
{
case REG_EXPAND_SZ:
if (!(pQuery->Flags & RTL_QUERY_REGISTRY_NOEXPAND))
{
RtlInitUnicodeString(&src, (WCHAR*)(((CHAR*)pInfo) + pInfo->DataOffset));
RtlInitUnicodeString(&src, data);
res = 0;
dst.MaximumLength = 0;
RtlExpandEnvironmentStrings_U(pEnvironment, &src, &dst, &res);
@ -307,12 +308,12 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo,
case REG_SZ:
case REG_LINK:
if (str->Buffer == NULL)
RtlCreateUnicodeString(str, (WCHAR*)(((CHAR*)pInfo) + pInfo->DataOffset));
RtlCreateUnicodeString(str, data);
else
{
if (str->MaximumLength < len)
return STATUS_BUFFER_TOO_SMALL;
memcpy(str->Buffer, (char*)pInfo + pInfo->DataOffset, len);
memcpy(str->Buffer, data, len);
str->Length = len - sizeof(WCHAR);
}
break;
@ -330,28 +331,27 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo,
else if (str->MaximumLength < len)
return STATUS_BUFFER_TOO_SMALL;
len -= sizeof(WCHAR);
memcpy(str->Buffer, ((CHAR*)pInfo) + pInfo->DataOffset, len);
memcpy(str->Buffer, data, len);
str->Buffer[len / sizeof(WCHAR)] = 0;
str->Length = len;
break;
default:
bin = pQuery->EntryContext;
if (pInfo->DataLength <= sizeof(ULONG))
memcpy(bin, ((CHAR*)pInfo) + pInfo->DataOffset,
pInfo->DataLength);
if (len <= sizeof(ULONG))
memcpy(bin, data, len);
else
{
if (bin[0] < 0)
{
if (pInfo->DataLength <= -bin[0])
memcpy(bin, (char*)pInfo + pInfo->DataOffset, pInfo->DataLength);
if (len <= -bin[0])
memcpy(bin, data, len);
}
else if (pInfo->DataLength <= bin[0])
else if (len <= bin[0])
{
bin[0] = len;
bin[1] = pInfo->Type;
memcpy(bin + 2, (char*)pInfo + pInfo->DataOffset, len);
bin[1] = type;
memcpy(bin + 2, data, len);
}
}
break;
@ -360,15 +360,13 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo,
else if (pQuery->QueryRoutine)
{
if((pQuery->Flags & RTL_QUERY_REGISTRY_NOEXPAND) ||
(pInfo->Type != REG_EXPAND_SZ && pInfo->Type != REG_MULTI_SZ))
(type != REG_EXPAND_SZ && type != REG_MULTI_SZ))
{
status = pQuery->QueryRoutine(pQuery->Name, pInfo->Type,
((CHAR*)pInfo) + pInfo->DataOffset, pInfo->DataLength,
pContext, pQuery->EntryContext);
status = pQuery->QueryRoutine(pQuery->Name, type, data, len, pContext, pQuery->EntryContext);
}
else if (pInfo->Type == REG_EXPAND_SZ)
else if (type == REG_EXPAND_SZ)
{
RtlInitUnicodeString(&src, (WCHAR*)(((CHAR*)pInfo) + pInfo->DataOffset));
RtlInitUnicodeString(&src, data);
res = 0;
dst.MaximumLength = 0;
RtlExpandEnvironmentStrings_U(pEnvironment, &src, &dst, &res);
@ -381,11 +379,11 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo,
}
else /* REG_MULTI_SZ */
{
for (offset = 0; offset < pInfo->DataLength; offset += len)
for (offset = 0; offset < len; offset += count)
{
wstr = (WCHAR*)((char*)pInfo + pInfo->DataOffset + offset);
len = (wcslen(wstr) + 1) * sizeof(WCHAR);
status = pQuery->QueryRoutine(pQuery->Name, REG_SZ, wstr, len, pContext, pQuery->EntryContext);
wstr = (WCHAR*)((char*)data + offset);
count = (wcslen(wstr) + 1) * sizeof(WCHAR);
status = pQuery->QueryRoutine(pQuery->Name, REG_SZ, wstr, count, pContext, pQuery->EntryContext);
if (status != STATUS_SUCCESS && status != STATUS_BUFFER_TOO_SMALL)
return status;
}

View File

@ -191,7 +191,7 @@ void WINAPI RtlInitializeGenericTable(RTL_GENERIC_TABLE *table, PRTL_GENERIC_COM
/******************************************************************************
* RtlEnumerateGenericTableWithoutSplaying [NTDLL.@]
*/
void * WINAPI RtlEnumerateGenericTableWithoutSplaying(RTL_GENERIC_TABLE *table, void *previous)
void * WINAPI RtlEnumerateGenericTableWithoutSplaying(RTL_GENERIC_TABLE *table, PVOID *previous)
{
static int warn_once;
@ -788,6 +788,27 @@ void WINAPI RtlInitializeGenericTableAvl(PRTL_AVL_TABLE table, PRTL_AVL_COMPARE_
FIXME("%p %p %p %p %p: stub\n", table, compare, allocate, free, context);
}
/******************************************************************************
* RtlEnumerateGenericTableWithoutSplayingAvl (NTDLL.@)
*/
void * WINAPI RtlEnumerateGenericTableWithoutSplayingAvl(RTL_AVL_TABLE *table, PVOID *previous)
{
static int warn_once;
if (!warn_once++)
FIXME("(%p, %p) stub!\n", table, previous);
return NULL;
}
/******************************************************************************
* RtlNumberGenericTableElementsAvl (NTDLL.@)
*/
ULONG WINAPI RtlNumberGenericTableElementsAvl(RTL_AVL_TABLE *table)
{
FIXME("(%p) stub!\n", table);
return 0;
}
/***********************************************************************
* RtlInsertElementGenericTableAvl (NTDLL.@)
*/

View File

@ -270,7 +270,7 @@ DEFINE_SYSCALL(NtQueryVolumeInformationFile, (HANDLE handle, IO_STATUS_BLOCK *io
DEFINE_SYSCALL(NtQueueApcThread, (HANDLE handle, PNTAPCFUNC func, ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3))
DEFINE_SYSCALL(NtQueueApcThreadEx, (HANDLE handle, HANDLE reserve_handle, PNTAPCFUNC func, ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3))
DEFINE_WRAPPED_SYSCALL(NtRaiseException, (EXCEPTION_RECORD *rec, ARM64_NT_CONTEXT *context, BOOL first_chance))
DEFINE_SYSCALL(NtRaiseHardError, (NTSTATUS status, ULONG count, UNICODE_STRING *params_mask, void **params, HARDERROR_RESPONSE_OPTION option, HARDERROR_RESPONSE *response))
DEFINE_SYSCALL(NtRaiseHardError, (NTSTATUS status, ULONG count, ULONG params_mask, void **params, HARDERROR_RESPONSE_OPTION option, HARDERROR_RESPONSE *response))
DEFINE_SYSCALL(NtReadFile, (HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc_user, IO_STATUS_BLOCK *io, void *buffer, ULONG length, LARGE_INTEGER *offset, ULONG *key))
DEFINE_SYSCALL(NtReadFileScatter, (HANDLE file, HANDLE event, PIO_APC_ROUTINE apc, void *apc_user, IO_STATUS_BLOCK *io, FILE_SEGMENT_ELEMENT *segments, ULONG length, LARGE_INTEGER *offset, ULONG *key))
DEFINE_SYSCALL(NtReadVirtualMemory, (HANDLE process, const void *addr, void *buffer, SIZE_T size, SIZE_T *bytes_read))

View File

@ -2632,7 +2632,7 @@ static ULONG query_reg_values_direct_int;
static union
{
ULONG size;
char data[16];
char data[32];
}
query_reg_values_direct_sized;
@ -2640,7 +2640,7 @@ static struct
{
ULONG size;
ULONG type;
char data[16];
char data[32];
}
query_reg_values_direct_typed;
@ -2708,7 +2708,7 @@ static struct query_reg_values_test query_reg_values_tests[] =
},
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"MeaningOfLife32", &query_reg_values_direct_int }},
STATUS_SUCCESS, 0, 0, REG_NONE, (WCHAR*)42
STATUS_SUCCESS, 0, 0, REG_NONE, L"\x2a"
},
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"MeaningOfLife64", &query_reg_values_direct_sized }},
@ -2783,11 +2783,11 @@ static struct query_reg_values_test query_reg_values_tests[] =
},
{
{{ query_routine, 0, (WCHAR*)L"I don't exist", NULL, REG_EXPAND_SZ, (WCHAR*)L"%SYSTEMDRIVE%" }},
STATUS_SUCCESS, 1, WINE_TODO_TYPE | WINE_TODO_SIZE, REG_SZ, L"C:"
STATUS_SUCCESS, 1, 0, REG_SZ, L"C:"
},
{
{{ query_routine, 0, (WCHAR*)L"I don't exist", NULL, REG_MULTI_SZ, (WCHAR*)L"Brussels\0Paris\0%PATH%\0" }},
STATUS_SUCCESS, 3, EXPECT_DEFAULT_DATA | SPLIT_MULTI | WINE_TODO_CALLS | WINE_TODO_TYPE | WINE_TODO_SIZE
STATUS_SUCCESS, 3, EXPECT_DEFAULT_DATA | SPLIT_MULTI
},
{
{{ query_routine, 0, (WCHAR*)L"I don't exist", NULL, REG_DWORD, (WCHAR*)0xdeadbeef }},
@ -2811,23 +2811,68 @@ static struct query_reg_values_test query_reg_values_tests[] =
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_str, REG_EXPAND_SZ, (WCHAR*)L"%SYSTEMDRIVE%" }},
STATUS_SUCCESS, 0, WINE_TODO_SIZE | WINE_TODO_DATA, REG_NONE, L"C:"
STATUS_SUCCESS, 0, 0, REG_NONE, L"C:"
},
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_str, REG_EXPAND_SZ, (WCHAR*)L"%SYSTEMDRIVE%" }},
STATUS_SUCCESS, 0, WINE_TODO_SIZE, REG_NONE, L"\x2323", 0, 2 * sizeof(WCHAR)
STATUS_SUCCESS, 0, 0, REG_NONE, L"\x2323", 0, 2 * sizeof(WCHAR)
},
/* DIRECT with a multi-string default value crashes on Windows */
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_int, REG_DWORD, (WCHAR*)0xdeadbeef }},
STATUS_SUCCESS, 0
},
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_int, REG_DWORD, (WCHAR*)L"\x2a", sizeof(DWORD) }},
STATUS_SUCCESS, 0, EXPECT_DEFAULT_DATA
},
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_sized, REG_DWORD, (WCHAR*)L"Some default", sizeof(L"Some default") }},
STATUS_SUCCESS, 0, EXPECT_DEFAULT_DATA
},
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_sized, REG_DWORD, (WCHAR*)L"Some default", sizeof(L"Some default") }},
STATUS_SUCCESS, 0, 0, REG_NONE, L"\xff", 1, 1
},
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_typed, REG_NONE, (WCHAR*)L"Some default", sizeof(L"Some default") }},
STATUS_SUCCESS, 0, WINE_TODO_TYPE | WINE_TODO_SIZE, 0x23, NULL, -1
},
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_typed, REG_QWORD, (WCHAR*)L"Some default", sizeof(L"Some default") }},
STATUS_SUCCESS, 0, WINE_TODO_TYPE | WINE_TODO_SIZE, 0x23, NULL, -1
},
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_typed, REG_QWORD, (WCHAR*)L"\x2a\0\0", sizeof(UINT64) }},
STATUS_SUCCESS, 0, EXPECT_DEFAULT_DATA
},
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_typed, REG_QWORD, (WCHAR*)L"\x2a\0\0", sizeof(UINT64) }},
STATUS_SUCCESS, 0, 0, 0x23, L"\x23", 1, 1
},
/* DIRECT with a multi-string default value crashes on Windows without NOEXPAND */
/* {
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_str, REG_NONE, (WCHAR*)L"A\0B\0C\0", sizeof(L"A\0B\0C\0") }},
STATUS_SUCCESS, EXPECT_DEFAULT_DATA
&query_reg_values_direct_str, REG_MULTI_SZ, (WCHAR*)L"A\0B\0C\0", sizeof(L"A\0B\0C\0") }},
STATUS_SUCCESS, 0, EXPECT_DEFAULT_DATA
}, */
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOEXPAND, (WCHAR*)L"I don't exist",
&query_reg_values_direct_str, REG_MULTI_SZ, (WCHAR*)L"A\0B\0C\0", sizeof(L"A\0B\0C\0") }},
STATUS_SUCCESS, 0, EXPECT_DEFAULT_DATA | WINE_TODO_SIZE
},
/* The default value is not used if it is not valid */
{
{{ query_routine, 0, (WCHAR*)L"I don't exist", NULL, REG_SZ }},
STATUS_DATA_OVERRUN, 0, EXPECT_DEFAULT_DATA | WINE_TODO_RET | WINE_TODO_CALLS
STATUS_DATA_OVERRUN, 0, EXPECT_DEFAULT_DATA
},
{
{{ query_routine, 0, (WCHAR*)L"I don't exist", NULL, REG_NONE, (WCHAR*)L"Some default" }},
@ -2843,12 +2888,6 @@ static struct query_reg_values_test query_reg_values_tests[] =
&query_reg_values_direct_str, REG_NONE, (WCHAR*)L"Some default" }},
STATUS_SUCCESS, 0, 0, REG_NONE, NULL, -1
},
/* DIRECT additionally requires the default value to be a string */
{
{{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist",
&query_reg_values_direct_int, REG_DWORD, (WCHAR*)0xdeadbeef }},
STATUS_SUCCESS, 0
},
/* REQUIRED fails if the value doesn't exist and there is no default */
{
{{ query_routine, RTL_QUERY_REGISTRY_REQUIRED, (WCHAR*)L"I don't exist",
@ -2985,12 +3024,12 @@ static void test_RtlQueryRegistryValues(void)
{
if (expected_data)
{
ok(!memcmp(&query_reg_values_direct_int, &expected_data, expected_size),
ok(!memcmp(&query_reg_values_direct_int, expected_data, expected_size),
"Data does not match\n");
}
else
{
- ok(query_reg_values_direct_int == 1,
ok(query_reg_values_direct_int == 1,
"Expected data to not change, got %lu\n", query_reg_values_direct_int);
}
}
@ -3001,14 +3040,22 @@ static void test_RtlQueryRegistryValues(void)
}
else if (query->EntryContext == &query_reg_values_direct_typed)
{
if (expected_size == -1)
expected_size = sizeof(query_reg_values_direct_typed.data);
todo_wine_if(test->flags & WINE_TODO_SIZE)
ok(query_reg_values_direct_typed.size == expected_size,
"Expected size %lu, got %lu\n", expected_size, query_reg_values_direct_typed.size);
todo_wine_if(test->flags & WINE_TODO_TYPE)
ok(query_reg_values_direct_typed.type == expected_type,
"Expected type %lu, got %lu\n", expected_type, query_reg_values_direct_typed.type);
ok(!memcmp(query_reg_values_direct_typed.data, expected_data, expected_size),
"Data does not match\n");
if (expected_data)
{
ok(!memcmp(query_reg_values_direct_typed.data, expected_data, expected_size),
"Data does not match\n");
}
}
}
}

View File

@ -3113,10 +3113,6 @@ NTSTATUS cdrom_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc
}
if (needs_close) close( fd );
if (!NT_ERROR(status))
{
io->Status = status;
io->Information = sz;
if (event) NtSetEvent(event, NULL);
}
file_complete_async( device, event, apc, apc_user, io, status, sz );
return status;
}

View File

@ -5470,7 +5470,7 @@ static unsigned int register_async_file_read( HANDLE handle, HANDLE event,
return status;
}
void add_completion( HANDLE handle, ULONG_PTR value, NTSTATUS status, ULONG info, BOOL async )
static void add_completion( HANDLE handle, ULONG_PTR value, NTSTATUS status, ULONG info, BOOL async )
{
SERVER_START_REQ( add_fd_completion )
{
@ -5484,6 +5484,20 @@ void add_completion( HANDLE handle, ULONG_PTR value, NTSTATUS status, ULONG info
SERVER_END_REQ;
}
/* complete async file I/O, signaling completion in all ways necessary */
void file_complete_async( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc_user,
IO_STATUS_BLOCK *io, NTSTATUS status, ULONG_PTR information )
{
ULONG_PTR iosb_ptr = iosb_client_ptr(io);
io->Status = status;
io->Information = information;
if (event) NtSetEvent( event, NULL );
if (apc) NtQueueApcThread( GetCurrentThread(), (PNTAPCFUNC)apc, (ULONG_PTR)apc_user, iosb_ptr, 0 );
else if (apc_user) add_completion( handle, (ULONG_PTR)apc_user, status, information, FALSE );
}
static unsigned int set_pending_write( HANDLE device )
{
unsigned int status;
@ -6019,10 +6033,7 @@ NTSTATUS WINAPI NtWriteFileGather( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
int result, unix_handle, needs_close;
unsigned int options, status;
UINT pos = 0, total = 0;
client_ptr_t iosb_ptr = iosb_client_ptr(io);
enum server_fd_type type;
ULONG_PTR cvalue = apc ? 0 : (ULONG_PTR)apc_user;
BOOL send_completion = FALSE;
TRACE( "(%p,%p,%p,%p,%p,%p,0x%08x,%p,%p),partial stub!\n",
file, event, apc, apc_user, io, segments, (int)length, offset, key );
@ -6074,24 +6085,18 @@ NTSTATUS WINAPI NtWriteFileGather( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
}
}
send_completion = cvalue != 0;
done:
if (needs_close) close( unix_handle );
if (status == STATUS_SUCCESS)
{
io->Status = status;
io->Information = total;
file_complete_async( file, event, apc, apc_user, io, status, total );
TRACE("= SUCCESS (%u)\n", total);
if (event) NtSetEvent( event, NULL );
if (apc) NtQueueApcThread( GetCurrentThread(), (PNTAPCFUNC)apc, (ULONG_PTR)apc_user, iosb_ptr, 0 );
}
else
{
TRACE("= 0x%08x\n", status);
if (status != STATUS_PENDING && event) NtResetEvent( event, NULL );
}
if (send_completion) add_completion( file, cvalue, status, total, FALSE );
return status;
}
@ -6177,6 +6182,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
IO_STATUS_BLOCK *io, ULONG code, void *in_buffer, ULONG in_size,
void *out_buffer, ULONG out_size )
{
ULONG_PTR size = 0;
NTSTATUS status;
TRACE( "(%p,%p,%p,%p,%p,0x%08x,%p,0x%08x,%p,0x%08x)\n",
@ -6220,7 +6226,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
buffer->StartingVcn.QuadPart = 1;
buffer->Extents[0].NextVcn.QuadPart = 0;
buffer->Extents[0].Lcn.QuadPart = 0;
io->Information = sizeof(RETRIEVAL_POINTERS_BUFFER);
size = sizeof(RETRIEVAL_POINTERS_BUFFER);
status = STATUS_SUCCESS;
}
else
@ -6254,7 +6260,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
memset( info, 0, sizeof(*info) );
memcpy( info->ObjectId, &st.st_dev, sizeof(st.st_dev) );
memcpy( info->ObjectId + 8, &st.st_ino, sizeof(st.st_ino) );
io->Information = sizeof(*info);
size = sizeof(*info);
}
else status = STATUS_BUFFER_TOO_SMALL;
break;
@ -6262,7 +6268,6 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
case FSCTL_SET_SPARSE:
TRACE("FSCTL_SET_SPARSE: Ignoring request\n");
io->Information = 0;
status = STATUS_SUCCESS;
break;
default:
@ -6270,7 +6275,8 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
in_buffer, in_size, out_buffer, out_size );
}
if (!NT_ERROR(status) && status != STATUS_PENDING) io->Status = status;
if (!NT_ERROR(status) && status != STATUS_PENDING)
file_complete_async( handle, event, apc, apc_context, io, status, size );
return status;
}

View File

@ -1576,7 +1576,7 @@ static void load_ntdll_wow64_functions( HMODULE module )
GET_FUNC( RtlpFreezeTimeBias );
GET_FUNC( RtlpQueryProcessDebugInformationRemote );
#undef GET_FUNC
pDbgUiRemoteBreakin = (void *)find_named_export( module, exports, "DbgUiRemoteBreakin" );
p__wine_ctrl_routine = (void *)find_named_export( module, exports, "__wine_ctrl_routine" );
#ifdef _WIN64

View File

@ -1457,11 +1457,7 @@ NTSTATUS serial_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE ap
if (needs_close) close( fd );
if (!NT_ERROR(status))
{
io->Status = status;
io->Information = sz;
if (event) NtSetEvent(event, NULL);
}
file_complete_async( device, event, apc, apc_user, io, status, sz );
return status;
}

View File

@ -640,7 +640,7 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO
(ULONG_PTR)func == call->create_thread.func && (ULONG_PTR)arg == call->create_thread.arg)
{
/* FIXME: hack for debugging 32-bit process without a 64-bit ntdll */
if (is_old_wow64() && func == (void *)0x7ffe1000) func = pDbgUiRemoteBreakin;
if (is_wow64()) func = pDbgUiRemoteBreakin;
attr->TotalLength = sizeof(buffer);
attr->Attributes[0].Attribute = PS_ATTRIBUTE_CLIENT_ID;
attr->Attributes[0].Size = sizeof(id);

View File

@ -1425,18 +1425,6 @@ static NTSTATUS sock_transmit( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc,
return status;
}
static void complete_async( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc_user,
IO_STATUS_BLOCK *io, NTSTATUS status, ULONG_PTR information )
{
ULONG_PTR iosb_ptr = iosb_client_ptr(io);
io->Status = status;
io->Information = information;
if (event) NtSetEvent( event, NULL );
if (apc) NtQueueApcThread( GetCurrentThread(), (PNTAPCFUNC)apc, (ULONG_PTR)apc_user, iosb_ptr, 0 );
if (apc_user) add_completion( handle, (ULONG_PTR)apc_user, status, information, FALSE );
}
static NTSTATUS do_getsockopt( HANDLE handle, IO_STATUS_BLOCK *io, int level,
int option, void *out_buffer, ULONG out_size )
@ -1563,7 +1551,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
}
SERVER_END_REQ;
complete_async( handle, event, apc, apc_user, io, status, 0 );
file_complete_async( handle, event, apc, apc_user, io, status, 0 );
return status;
}
@ -1710,7 +1698,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
return STATUS_BUFFER_TOO_SMALL;
status = *(NTSTATUS *)in_buffer;
complete_async( handle, event, apc, apc_user, io, status, 0 );
file_complete_async( handle, event, apc, apc_user, io, status, 0 );
return status;
}
@ -1736,7 +1724,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
{
*(int *)out_buffer = 0;
if (needs_close) close( fd );
complete_async( handle, event, apc, apc_user, io, STATUS_SUCCESS, 0 );
file_complete_async( handle, event, apc, apc_user, io, STATUS_SUCCESS, 0 );
return STATUS_SUCCESS;
}
}
@ -1749,7 +1737,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
}
*(int *)out_buffer = value;
if (needs_close) close( fd );
complete_async( handle, event, apc, apc_user, io, STATUS_SUCCESS, 0 );
file_complete_async( handle, event, apc, apc_user, io, STATUS_SUCCESS, 0 );
return STATUS_SUCCESS;
}
@ -1788,7 +1776,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
*(int *)out_buffer = !value;
}
if (needs_close) close( fd );
complete_async( handle, event, apc, apc_user, io, STATUS_SUCCESS, 0 );
file_complete_async( handle, event, apc, apc_user, io, STATUS_SUCCESS, 0 );
return STATUS_SUCCESS;
}
@ -1815,7 +1803,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
if (out_size < ret_size)
{
freeifaddrs( ifaddrs );
complete_async( handle, event, apc, apc_user, io, STATUS_BUFFER_TOO_SMALL, 0 );
file_complete_async( handle, event, apc, apc_user, io, STATUS_BUFFER_TOO_SMALL, 0 );
return STATUS_PENDING;
}
@ -1865,7 +1853,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
}
freeifaddrs( ifaddrs );
complete_async( handle, event, apc, apc_user, io, STATUS_SUCCESS, ret_size );
file_complete_async( handle, event, apc, apc_user, io, STATUS_SUCCESS, ret_size );
return STATUS_PENDING;
#else
FIXME( "Interface list queries are currently not supported on this platform.\n" );
@ -1920,7 +1908,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
}
if (needs_close) close( fd );
complete_async( handle, event, apc, apc_user, io, STATUS_SUCCESS, 0 );
file_complete_async( handle, event, apc, apc_user, io, STATUS_SUCCESS, 0 );
return STATUS_SUCCESS;
}

View File

@ -4073,10 +4073,10 @@ NTSTATUS WINAPI NtDisplayString( UNICODE_STRING *string )
* NtRaiseHardError (NTDLL.@)
*/
NTSTATUS WINAPI NtRaiseHardError( NTSTATUS status, ULONG count,
UNICODE_STRING *params_mask, void **params,
ULONG params_mask, void **params,
HARDERROR_RESPONSE_OPTION option, HARDERROR_RESPONSE *response )
{
FIXME( "%08x stub\n", (int)status );
FIXME( "%#08x %u %#x %p %u %p: stub\n", (int)status, (int)count, (int)params_mask, params, option, response );
return STATUS_NOT_IMPLEMENTED;
}

View File

@ -580,10 +580,6 @@ NTSTATUS tape_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc,
if (needs_close) close( fd );
if (!NT_ERROR(status))
{
io->Status = status;
io->Information = sz;
if (event) NtSetEvent( event, NULL );
}
file_complete_async( device, event, apc, apc_user, io, status, sz );
return status;
}

View File

@ -342,7 +342,8 @@ extern NTSTATUS open_unix_file( HANDLE *handle, const char *unix_name, ACCESS_MA
extern NTSTATUS get_device_info( int fd, struct _FILE_FS_DEVICE_INFORMATION *info );
extern void init_files(void);
extern void init_cpu_info(void);
extern void add_completion( HANDLE handle, ULONG_PTR value, NTSTATUS status, ULONG info, BOOL async );
extern void file_complete_async( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc_user,
IO_STATUS_BLOCK *io, NTSTATUS status, ULONG_PTR information );
extern void set_async_direct_result( HANDLE *async_handle, NTSTATUS status, ULONG_PTR information, BOOL mark_pending );
extern NTSTATUS unixcall_wine_dbg_write( void *args );

View File

@ -1072,7 +1072,7 @@
@ stub RtlEnumerateGenericTableAvl
@ stub RtlEnumerateGenericTableLikeADirectory
@ stdcall RtlEnumerateGenericTableWithoutSplaying(ptr ptr)
@ stub RtlEnumerateGenericTableWithoutSplayingAvl
@ stdcall RtlEnumerateGenericTableWithoutSplayingAvl(ptr ptr)
@ stdcall RtlEqualLuid(ptr ptr)
@ stdcall RtlEqualSid(ptr ptr)
@ stdcall RtlEqualString(ptr ptr long)
@ -1214,7 +1214,7 @@
@ stdcall RtlNtStatusToDosError(long)
@ stdcall RtlNtStatusToDosErrorNoTeb(long)
@ stdcall RtlNumberGenericTableElements(ptr)
@ stub RtlNumberGenericTableElementsAvl
@ stdcall RtlNumberGenericTableElementsAvl(ptr)
@ stdcall RtlNumberOfClearBits(ptr)
@ stdcall RtlNumberOfSetBits(ptr)
@ stub RtlOemStringToCountedUnicodeString

View File

@ -0,0 +1,6 @@
MODULE = rometadata.dll
IMPORTLIB = rometadata
IMPORTS = combase
SOURCES = \
main.c

194
dlls/rometadata/main.c Normal file
View File

@ -0,0 +1,194 @@
/*
* Copyright 2024 Zhiyi Zhang for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "initguid.h"
#include "objbase.h"
#include "cor.h"
#include "rometadata.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(rometadata);
struct metadata_dispenser
{
IMetaDataDispenserEx IMetaDataDispenserEx_iface;
LONG refcount;
};
static inline struct metadata_dispenser *impl_from_IMetaDataDispenserEx(IMetaDataDispenserEx *iface)
{
return CONTAINING_RECORD(iface, struct metadata_dispenser, IMetaDataDispenserEx_iface);
}
static HRESULT WINAPI MetaDataDispenser_QueryInterface(IMetaDataDispenserEx *iface, REFIID riid, void **obj)
{
TRACE("%p %s %p\n", iface, debugstr_guid(riid), obj);
if (IsEqualGUID(riid, &IID_IMetaDataDispenserEx)
|| IsEqualGUID(riid, &IID_IMetaDataDispenser)
|| IsEqualGUID(riid, &IID_IUnknown))
{
*obj = iface;
IMetaDataDispenserEx_AddRef(iface);
return S_OK;
}
FIXME("Unsupported interface %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
}
static ULONG WINAPI MetaDataDispenser_AddRef(IMetaDataDispenserEx *iface)
{
struct metadata_dispenser *this = impl_from_IMetaDataDispenserEx(iface);
ULONG ref = InterlockedIncrement(&this->refcount);
TRACE("%p ref=%lu\n", this, ref);
return ref;
}
static ULONG WINAPI MetaDataDispenser_Release(IMetaDataDispenserEx *iface)
{
struct metadata_dispenser *this = impl_from_IMetaDataDispenserEx(iface);
ULONG ref = InterlockedDecrement(&this->refcount);
TRACE("%p ref=%lu\n", this, ref);
if (ref == 0)
free(this);
return ref;
}
static HRESULT WINAPI MetaDataDispenser_DefineScope(IMetaDataDispenserEx *iface, REFCLSID rclsid,
DWORD create_flags, REFIID riid, IUnknown **obj)
{
FIXME("%p %s %lx %s %p\n", iface, debugstr_guid(rclsid), create_flags, debugstr_guid(riid),
obj);
return E_NOTIMPL;
}
static HRESULT WINAPI MetaDataDispenser_OpenScope(IMetaDataDispenserEx *iface, const WCHAR *scope,
DWORD open_flags, REFIID riid, IUnknown **obj)
{
FIXME("%p %s %lx %s %p\n", iface, debugstr_w(scope), open_flags, debugstr_guid(riid), obj);
return E_NOTIMPL;
}
static HRESULT WINAPI MetaDataDispenser_OpenScopeOnMemory(IMetaDataDispenserEx *iface, const void *data,
ULONG data_size, DWORD open_flags, REFIID riid,
IUnknown **obj)
{
FIXME("%p %p %lu %lx %s %p\n", iface, data, data_size, open_flags, debugstr_guid(riid), obj);
return E_NOTIMPL;
}
static HRESULT WINAPI MetaDataDispenser_SetOption(IMetaDataDispenserEx *iface, REFGUID option_id, const VARIANT *value)
{
FIXME("%p %s %p\n", iface, debugstr_guid(option_id), debugstr_variant(value));
return E_NOTIMPL;
}
static HRESULT WINAPI MetaDataDispenser_GetOption(IMetaDataDispenserEx *iface, REFGUID optionid, VARIANT *value)
{
FIXME("%p %s %s\n", iface, debugstr_guid(optionid), debugstr_variant(value));
return E_NOTIMPL;
}
static HRESULT WINAPI MetaDataDispenser_OpenScopeOnITypeInfo(IMetaDataDispenserEx *iface, ITypeInfo *type_info,
DWORD open_flags, REFIID riid, IUnknown **obj)
{
FIXME("%p %p %lu %s %p\n", iface, type_info, open_flags, debugstr_guid(riid), obj);
return E_NOTIMPL;
}
static HRESULT WINAPI MetaDataDispenser_GetCORSystemDirectory(IMetaDataDispenserEx *iface, WCHAR *buffer,
DWORD buffer_size, DWORD *return_length)
{
FIXME("%p %p %lu %p\n", iface, buffer, buffer_size, return_length);
return E_NOTIMPL;
}
static HRESULT WINAPI MetaDataDispenser_FindAssembly(IMetaDataDispenserEx *iface, const WCHAR *app_base,
const WCHAR *private_bin, const WCHAR *global_bin,
const WCHAR *assembly_name, WCHAR *name, ULONG name_size,
ULONG *return_length)
{
FIXME("%p %s %s %s %s %p %lu %p\n", iface, debugstr_w(app_base), debugstr_w(private_bin),
debugstr_w(global_bin), debugstr_w(assembly_name), name, name_size, return_length);
return E_NOTIMPL;
}
static HRESULT WINAPI MetaDataDispenser_FindAssemblyModule(IMetaDataDispenserEx *iface, const WCHAR *app_base,
const WCHAR *private_bin, const WCHAR *global_bin,
const WCHAR *assembly_name, const WCHAR *module_name,
WCHAR *name, ULONG name_size, ULONG *return_length)
{
FIXME("%p %s %s %s %s %s %p %lu %p\n", iface, debugstr_w(app_base), debugstr_w(private_bin),
debugstr_w(global_bin), debugstr_w(assembly_name), debugstr_w(module_name), name, name_size, return_length);
return E_NOTIMPL;
}
static const struct IMetaDataDispenserExVtbl MetaDataDispenserExVtbl =
{
MetaDataDispenser_QueryInterface,
MetaDataDispenser_AddRef,
MetaDataDispenser_Release,
MetaDataDispenser_DefineScope,
MetaDataDispenser_OpenScope,
MetaDataDispenser_OpenScopeOnMemory,
MetaDataDispenser_SetOption,
MetaDataDispenser_GetOption,
MetaDataDispenser_OpenScopeOnITypeInfo,
MetaDataDispenser_GetCORSystemDirectory,
MetaDataDispenser_FindAssembly,
MetaDataDispenser_FindAssemblyModule
};
STDAPI MetaDataGetDispenser(REFCLSID rclsid, REFIID riid, void **obj)
{
struct metadata_dispenser *dispenser;
HRESULT hr;
TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), obj);
if (!IsEqualGUID(rclsid, &CLSID_CorMetaDataDispenser))
return CLASS_E_CLASSNOTAVAILABLE;
dispenser = malloc(sizeof(*dispenser));
if (!dispenser)
return E_OUTOFMEMORY;
dispenser->IMetaDataDispenserEx_iface.lpVtbl = &MetaDataDispenserExVtbl;
dispenser->refcount = 1;
hr = IMetaDataDispenserEx_QueryInterface(&dispenser->IMetaDataDispenserEx_iface, riid, obj);
IMetaDataDispenserEx_Release(&dispenser->IMetaDataDispenserEx_iface);
return hr;
}
BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
{
TRACE("inst %p, reason %lu, reserved %p.\n", inst, reason, reserved);
if (reason == DLL_PROCESS_ATTACH)
DisableThreadLibraryCalls(inst);
return TRUE;
}

View File

@ -0,0 +1 @@
@ stdcall MetaDataGetDispenser(ptr ptr ptr)

View File

@ -0,0 +1,5 @@
TESTDLL = rometadata.dll
IMPORTS = combase rometadata
SOURCES = \
rometadata.c

View File

@ -0,0 +1,70 @@
/*
* Copyright 2024 Zhiyi Zhang for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include <windows.h>
#include "initguid.h"
#include "cor.h"
#include "roapi.h"
#include "rometadata.h"
#include "wine/test.h"
DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
static void test_MetaDataGetDispenser(void)
{
IMetaDataDispenserEx *dispenser_ex;
IMetaDataDispenser *dispenser;
IUnknown *unknown;
HRESULT hr;
/* Invalid parameters */
hr = MetaDataGetDispenser(&CLSID_NULL, &IID_IMetaDataDispenser, (void **)&dispenser);
ok(hr == CLASS_E_CLASSNOTAVAILABLE, "Got unexpected hr %#lx.\n", hr);
hr = MetaDataGetDispenser(&CLSID_CorMetaDataDispenser, &IID_NULL, (void **)&dispenser);
ok(hr == E_NOINTERFACE, "Got unexpected hr %#lx.\n", hr);
/* Normal calls */
hr = MetaDataGetDispenser(&CLSID_CorMetaDataDispenser, &IID_IUnknown, (void **)&unknown);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
IUnknown_Release(unknown);
hr = MetaDataGetDispenser(&CLSID_CorMetaDataDispenser, &IID_IMetaDataDispenser, (void **)&dispenser);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
IMetaDataDispenser_Release(dispenser);
hr = MetaDataGetDispenser(&CLSID_CorMetaDataDispenser, &IID_IMetaDataDispenserEx, (void **)&dispenser_ex);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
IMetaDataDispenserEx_Release(dispenser_ex);
}
START_TEST(rometadata)
{
HRESULT hr;
hr = RoInitialize(RO_INIT_MULTITHREADED);
ok(hr == S_OK, "RoInitialize failed, hr %#lx\n", hr);
test_MetaDataGetDispenser();
RoUninitialize();
}

View File

@ -59,6 +59,7 @@ TW_UINT16 sane_option_set_int(const char *option_name, int val, BOOL *needs_relo
{
struct option_descriptor opt;
TW_UINT16 rc = sane_find_option(option_name, TYPE_INT, &opt);
if (!opt.is_settable) return TWCC_OPERATIONERROR;
if (rc == TWCC_SUCCESS) rc = sane_option_set_value( opt.optno, &val, needs_reload );
return rc;
@ -77,6 +78,7 @@ TW_UINT16 sane_option_set_bool(const char *option_name, int val )
{
struct option_descriptor opt;
TW_UINT16 rc = sane_find_option(option_name, TYPE_BOOL, &opt);
if (!opt.is_settable) return TWCC_OPERATIONERROR;
if (rc == TWCC_SUCCESS) rc = sane_option_set_value( opt.optno, &val, NULL );
return rc;
@ -102,6 +104,7 @@ TW_UINT16 sane_option_set_str(const char *option_name, char *val, BOOL *needs_re
{
struct option_descriptor opt;
TW_UINT16 rc = sane_find_option(option_name, TYPE_STRING, &opt);
if (!opt.is_settable) return TWCC_OPERATIONERROR;
if (rc == TWCC_SUCCESS) rc = sane_option_set_value( opt.optno, val, needs_reload );
return rc;

View File

@ -159,6 +159,7 @@ static void map_descr( struct option_descriptor *descr, const SANE_Option_Descri
descr->constraint_type = map_constraint_type( opt->constraint_type );
descr->size = opt->size;
descr->is_active = SANE_OPTION_IS_ACTIVE( opt->cap );
descr->is_settable = SANE_OPTION_IS_SETTABLE( opt->cap );
if (opt->title) len = ntdll_umbstowcs( opt->title, strlen(opt->title),
descr->title, ARRAY_SIZE(descr->title) );
descr->title[len] = 0;

View File

@ -39,6 +39,7 @@ struct option_descriptor
int optno;
int size;
int is_active;
int is_settable;
enum { TYPE_BOOL, TYPE_INT, TYPE_FIXED, TYPE_STRING, TYPE_BUTTON, TYPE_GROUP } type;
enum { UNIT_NONE, UNIT_PIXEL, UNIT_BIT, UNIT_MM, UNIT_DPI, UNIT_PERCENT, UNIT_MICROSECOND } unit;
enum { CONSTRAINT_NONE, CONSTRAINT_RANGE, CONSTRAINT_WORD_LIST, CONSTRAINT_STRING_LIST } constraint_type;

View File

@ -56,5 +56,3 @@ SOURCES = \
vulkan.c \
window.c \
winstation.c
font_EXTRADEFS = -DWINE_FONT_DIR=\"`${MAKEDEP} -R ${datadir}/wine ${fontdir}`\"

View File

@ -462,10 +462,6 @@ static const struct nls_update_font_list
static pthread_mutex_t font_lock = PTHREAD_MUTEX_INITIALIZER;
#ifndef WINE_FONT_DIR
#define WINE_FONT_DIR "fonts"
#endif
#ifdef WORDS_BIGENDIAN
#define GET_BE_WORD(x) (x)
#define GET_BE_DWORD(x) (x)
@ -476,20 +472,12 @@ static pthread_mutex_t font_lock = PTHREAD_MUTEX_INITIALIZER;
static void get_fonts_data_dir_path( const WCHAR *file, WCHAR *path )
{
const char *dir;
const char *dir = ntdll_get_build_dir();
ULONG len = MAX_PATH;
if ((dir = ntdll_get_data_dir()))
{
wine_unix_to_nt_file_name( dir, path, &len );
asciiz_to_unicode( path + len - 1, "\\" WINE_FONT_DIR "\\" );
}
else if ((dir = ntdll_get_build_dir()))
{
wine_unix_to_nt_file_name( dir, path, &len );
asciiz_to_unicode( path + len - 1, "\\fonts\\" );
}
if (!dir) dir = ntdll_get_data_dir();
wine_unix_to_nt_file_name( dir, path, &len );
asciiz_to_unicode( path + len - 1, "\\fonts\\" );
if (file) lstrcatW( path, file );
}

View File

@ -29,5 +29,8 @@ import "windows.storage.idl";
import "windows.system.idl";
#define DO_NO_IMPORTS
#define _WINDOWS_APPLICATIONMODEL
#include "windows.applicationmodel.core.idl"
#include "windows.applicationmodel.idl"
#include "windows.applicationmodel.activation.idl"
#include "windows.applicationmodel.background.idl"

View File

@ -728,6 +728,7 @@ static HRESULT media_stream_send_sample(struct media_stream *stream, const struc
if (!wg_parser_stream_copy_buffer(stream->wg_stream, data, 0, wg_buffer->size))
{
hr = S_FALSE;
wg_parser_stream_release_buffer(stream->wg_stream);
IMFMediaBuffer_Unlock(buffer);
goto out;
@ -789,8 +790,12 @@ static HRESULT wait_on_sample(struct media_stream *stream, IUnknown *token)
TRACE("%p, %p\n", stream, token);
if (wg_parser_stream_get_buffer(source->wg_parser, stream->wg_stream, &buffer))
return media_stream_send_sample(stream, &buffer, token);
while (wg_parser_stream_get_buffer(source->wg_parser, stream->wg_stream, &buffer))
{
HRESULT hr = media_stream_send_sample(stream, &buffer, token);
if (hr != S_FALSE)
return hr;
}
return media_stream_send_eos(source, stream);
}

View File

@ -412,11 +412,12 @@ static NTSTATUS wg_parser_stream_release_buffer(void *args)
pthread_mutex_lock(&parser->mutex);
assert(stream->buffer);
gst_buffer_unmap(stream->buffer, &stream->map_info);
gst_buffer_unref(stream->buffer);
stream->buffer = NULL;
if (stream->buffer)
{
gst_buffer_unmap(stream->buffer, &stream->map_info);
gst_buffer_unref(stream->buffer);
stream->buffer = NULL;
}
pthread_mutex_unlock(&parser->mutex);
pthread_cond_signal(&stream->event_empty_cond);
@ -576,24 +577,20 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event)
switch (event->type)
{
case GST_EVENT_SEGMENT:
pthread_mutex_lock(&parser->mutex);
if (stream->enabled)
{
const GstSegment *segment;
gst_event_parse_segment(event, &segment);
if (segment->format != GST_FORMAT_TIME)
{
const GstSegment *segment;
gst_event_parse_segment(event, &segment);
if (segment->format != GST_FORMAT_TIME)
{
pthread_mutex_unlock(&parser->mutex);
GST_FIXME("Unhandled format \"%s\".", gst_format_get_name(segment->format));
break;
}
gst_segment_copy_into(segment, &stream->segment);
GST_FIXME("Unhandled format \"%s\".", gst_format_get_name(segment->format));
break;
}
pthread_mutex_lock(&parser->mutex);
gst_segment_copy_into(segment, &stream->segment);
pthread_mutex_unlock(&parser->mutex);
break;
}
case GST_EVENT_EOS:
pthread_mutex_lock(&parser->mutex);
@ -608,17 +605,14 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event)
case GST_EVENT_FLUSH_START:
pthread_mutex_lock(&parser->mutex);
if (stream->enabled)
{
stream->flushing = true;
pthread_cond_signal(&stream->event_empty_cond);
stream->flushing = true;
pthread_cond_signal(&stream->event_empty_cond);
if (stream->buffer)
{
gst_buffer_unmap(stream->buffer, &stream->map_info);
gst_buffer_unref(stream->buffer);
stream->buffer = NULL;
}
if (stream->buffer)
{
gst_buffer_unmap(stream->buffer, &stream->map_info);
gst_buffer_unref(stream->buffer);
stream->buffer = NULL;
}
pthread_mutex_unlock(&parser->mutex);
@ -636,8 +630,7 @@ static gboolean sink_event_cb(GstPad *pad, GstObject *parent, GstEvent *event)
pthread_mutex_lock(&parser->mutex);
stream->eos = false;
if (stream->enabled)
stream->flushing = false;
stream->flushing = false;
pthread_mutex_unlock(&parser->mutex);
break;

View File

@ -207,10 +207,7 @@ extern BOOL macdrv_SystemParametersInfo(UINT action, UINT int_param, void *ptr_p
extern macdrv_window macdrv_get_cocoa_window(HWND hwnd, BOOL require_on_screen);
extern RGNDATA *get_region_data(HRGN hrgn, HDC hdc_lptodp);
extern void activate_on_following_focus(void);
extern struct window_surface *create_surface(HWND hwnd, macdrv_window window, const RECT *rect,
struct window_surface *old_surface, BOOL use_alpha);
extern void set_surface_use_alpha(struct window_surface *window_surface, BOOL use_alpha);
extern void surface_clip_to_visible_rect(struct window_surface *window_surface, const RECT *visible_rect);
extern void macdrv_handle_event(const macdrv_event *event);

View File

@ -127,8 +127,8 @@ static struct macdrv_window_surface *get_mac_surface(struct window_surface *surf
/***********************************************************************
* create_surface
*/
struct window_surface *create_surface(HWND hwnd, macdrv_window window, const RECT *rect,
struct window_surface *old_surface, BOOL use_alpha)
static struct window_surface *create_surface(HWND hwnd, macdrv_window window, const RECT *rect,
struct window_surface *old_surface, BOOL use_alpha)
{
struct macdrv_window_surface *surface;
int width = rect->right - rect->left, height = rect->bottom - rect->top;
@ -265,7 +265,7 @@ done:
* Intersect the accumulated drawn region with a new visible rect,
* effectively discarding stale drawing in the surface slack area.
*/
void surface_clip_to_visible_rect(struct window_surface *window_surface, const RECT *visible_rect)
static void surface_clip_to_visible_rect(struct window_surface *window_surface, const RECT *visible_rect)
{
struct macdrv_window_surface *surface = get_mac_surface(window_surface);
RECT rect = *visible_rect;
@ -277,3 +277,95 @@ void surface_clip_to_visible_rect(struct window_surface *window_surface, const R
intersect_rect(&window_surface->bounds, &window_surface->bounds, &rect);
window_surface_unlock(window_surface);
}
static inline RECT get_surface_rect(const RECT *visible_rect)
{
RECT rect = *visible_rect;
OffsetRect(&rect, -visible_rect->left, -visible_rect->top);
rect.left &= ~127;
rect.top &= ~127;
rect.right = max(rect.left + 128, (rect.right + 127) & ~127);
rect.bottom = max(rect.top + 128, (rect.bottom + 127) & ~127);
return rect;
}
/***********************************************************************
* CreateWindowSurface (MACDRV.@)
*/
BOOL macdrv_CreateWindowSurface(HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface)
{
struct macdrv_win_data *data;
DWORD style = NtUserGetWindowLongW(hwnd, GWL_STYLE);
RECT surface_rect;
TRACE("hwnd %p, swp_flags %08x, visible %s, surface %p\n", hwnd, swp_flags, wine_dbgstr_rect(visible_rect), surface);
if (!(data = get_win_data(hwnd))) return TRUE; /* use default surface */
if (*surface) window_surface_release(*surface);
*surface = NULL;
surface_rect = get_surface_rect(visible_rect);
if (data->surface)
{
if (EqualRect(&data->surface->rect, &surface_rect))
{
/* existing surface is good enough */
surface_clip_to_visible_rect(data->surface, visible_rect);
window_surface_add_ref(data->surface);
*surface = data->surface;
goto done;
}
}
else if (!(swp_flags & SWP_SHOWWINDOW) && !(style & WS_VISIBLE)) goto done;
*surface = create_surface(data->hwnd, data->cocoa_window, &surface_rect, data->surface, FALSE);
done:
release_win_data(data);
return TRUE;
}
/***********************************************************************
* CreateLayeredWindow (MACDRV.@)
*/
BOOL macdrv_CreateLayeredWindow(HWND hwnd, const RECT *window_rect, COLORREF color_key,
struct window_surface **window_surface)
{
struct window_surface *surface;
struct macdrv_win_data *data;
RECT rect;
if (!(data = get_win_data(hwnd))) return FALSE;
data->layered = TRUE;
data->ulw_layered = TRUE;
rect = *window_rect;
OffsetRect(&rect, -window_rect->left, -window_rect->top);
surface = data->surface;
if (!surface || !EqualRect(&surface->rect, &rect))
{
data->surface = create_surface(data->hwnd, data->cocoa_window, &rect, NULL, TRUE);
macdrv_set_window_surface(data->cocoa_window, data->surface);
if (surface) window_surface_release(surface);
surface = data->surface;
if (data->unminimized_surface)
{
window_surface_release(data->unminimized_surface);
data->unminimized_surface = NULL;
}
}
else set_surface_use_alpha(surface, TRUE);
if ((*window_surface = surface)) window_surface_add_ref(surface);
release_win_data(data);
return TRUE;
}

View File

@ -1890,46 +1890,6 @@ done:
}
/***********************************************************************
* CreateLayeredWindow (MACDRV.@)
*/
BOOL macdrv_CreateLayeredWindow(HWND hwnd, const RECT *window_rect, COLORREF color_key,
struct window_surface **window_surface)
{
struct window_surface *surface;
struct macdrv_win_data *data;
RECT rect;
if (!(data = get_win_data(hwnd))) return FALSE;
data->layered = TRUE;
data->ulw_layered = TRUE;
rect = *window_rect;
OffsetRect(&rect, -window_rect->left, -window_rect->top);
surface = data->surface;
if (!surface || !EqualRect(&surface->rect, &rect))
{
data->surface = create_surface(data->hwnd, data->cocoa_window, &rect, NULL, TRUE);
macdrv_set_window_surface(data->cocoa_window, data->surface);
if (surface) window_surface_release(surface);
surface = data->surface;
if (data->unminimized_surface)
{
window_surface_release(data->unminimized_surface);
data->unminimized_surface = NULL;
}
}
else set_surface_use_alpha(surface, TRUE);
if ((*window_surface = surface)) window_surface_add_ref(surface);
release_win_data(data);
return TRUE;
}
/***********************************************************************
* UpdateLayeredWindow (MACDRV.@)
*/
@ -1984,19 +1944,6 @@ LRESULT macdrv_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
}
static inline RECT get_surface_rect(const RECT *visible_rect)
{
RECT rect = *visible_rect;
OffsetRect(&rect, -visible_rect->left, -visible_rect->top);
rect.left &= ~127;
rect.top &= ~127;
rect.right = max(rect.left + 128, (rect.right + 127) & ~127);
rect.bottom = max(rect.top + 128, (rect.bottom + 127) & ~127);
return rect;
}
/***********************************************************************
* WindowPosChanging (MACDRV.@)
*/
@ -2028,44 +1975,6 @@ done:
}
/***********************************************************************
* CreateWindowSurface (MACDRV.@)
*/
BOOL macdrv_CreateWindowSurface(HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface)
{
struct macdrv_win_data *data;
DWORD style = NtUserGetWindowLongW(hwnd, GWL_STYLE);
RECT surface_rect;
TRACE("hwnd %p, swp_flags %08x, visible %s, surface %p\n", hwnd, swp_flags, wine_dbgstr_rect(visible_rect), surface);
if (!(data = get_win_data(hwnd))) return TRUE; /* use default surface */
if (*surface) window_surface_release(*surface);
*surface = NULL;
surface_rect = get_surface_rect(visible_rect);
if (data->surface)
{
if (EqualRect(&data->surface->rect, &surface_rect))
{
/* existing surface is good enough */
surface_clip_to_visible_rect(data->surface, visible_rect);
window_surface_add_ref(data->surface);
*surface = data->surface;
goto done;
}
}
else if (!(swp_flags & SWP_SHOWWINDOW) && !(style & WS_VISIBLE)) goto done;
*surface = create_surface(data->hwnd, data->cocoa_window, &surface_rect, data->surface, FALSE);
done:
release_win_data(data);
return TRUE;
}
/***********************************************************************
* WindowPosChanged (MACDRV.@)
*/

View File

@ -272,11 +272,34 @@ void wayland_shm_buffer_unref(struct wayland_shm_buffer *shm_buffer);
* Wayland window surface
*/
struct window_surface *wayland_window_surface_create(HWND hwnd, const RECT *rect);
void wayland_window_surface_update_wayland_surface(struct window_surface *surface,
struct wayland_surface *wayland_surface);
void wayland_window_flush(HWND hwnd);
/**********************************************************************
* Wayland Window
*/
/* private window data */
struct wayland_win_data
{
struct rb_entry entry;
/* hwnd that this private data belongs to */
HWND hwnd;
/* wayland surface (if any) for this window */
struct wayland_surface *wayland_surface;
/* wine window_surface backing this window */
struct window_surface *window_surface;
/* USER window rectangle relative to win32 parent window client area */
RECT window_rect;
/* USER client rectangle relative to win32 parent window client area */
RECT client_rect;
BOOL managed;
};
struct wayland_win_data *wayland_win_data_get(HWND hwnd);
void wayland_win_data_release(struct wayland_win_data *data);
/**********************************************************************
* Wayland Keyboard
*/

View File

@ -56,23 +56,6 @@ static BOOL set_window_pos(HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy,
}
/* private window data */
struct wayland_win_data
{
struct rb_entry entry;
/* hwnd that this private data belongs to */
HWND hwnd;
/* wayland surface (if any) for this window */
struct wayland_surface *wayland_surface;
/* wine window_surface backing this window */
struct window_surface *window_surface;
/* USER window rectangle relative to win32 parent window client area */
RECT window_rect;
/* USER client rectangle relative to win32 parent window client area */
RECT client_rect;
BOOL managed;
};
static int wayland_win_data_cmp_rb(const void *key,
const struct rb_entry *entry)
{
@ -153,7 +136,7 @@ static void wayland_win_data_destroy(struct wayland_win_data *data)
*
* Lock and return the data structure associated with a window.
*/
static struct wayland_win_data *wayland_win_data_get(HWND hwnd)
struct wayland_win_data *wayland_win_data_get(HWND hwnd)
{
struct rb_entry *rb_entry;
@ -172,7 +155,7 @@ static struct wayland_win_data *wayland_win_data_get(HWND hwnd)
*
* Release the data returned by wayland_win_data_get.
*/
static void wayland_win_data_release(struct wayland_win_data *data)
void wayland_win_data_release(struct wayland_win_data *data)
{
assert(data);
pthread_mutex_unlock(&win_data_mutex);
@ -471,42 +454,6 @@ done:
}
/***********************************************************************
* WAYLAND_CreateWindowSurface
*/
BOOL WAYLAND_CreateWindowSurface(HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface)
{
struct wayland_win_data *data;
RECT surface_rect;
TRACE("hwnd %p, swp_flags %08x, visible %s, surface %p\n", hwnd, swp_flags, wine_dbgstr_rect(visible_rect), surface);
if (!(data = wayland_win_data_get(hwnd))) return TRUE; /* use default surface */
/* Release the dummy surface wine provides for toplevels. */
if (*surface) window_surface_release(*surface);
*surface = NULL;
surface_rect = *visible_rect;
OffsetRect(&surface_rect, -surface_rect.left, -surface_rect.top);
/* Check if we can reuse our current window surface. */
if (data->window_surface &&
EqualRect(&data->window_surface->rect, &surface_rect))
{
window_surface_add_ref(data->window_surface);
*surface = data->window_surface;
TRACE("reusing surface %p\n", *surface);
goto done;
}
*surface = wayland_window_surface_create(data->hwnd, &surface_rect);
done:
wayland_win_data_release(data);
return TRUE;
}
/***********************************************************************
* WAYLAND_WindowPosChanged
*/

View File

@ -449,7 +449,7 @@ static const struct window_surface_funcs wayland_window_surface_funcs =
/***********************************************************************
* wayland_window_surface_create
*/
struct window_surface *wayland_window_surface_create(HWND hwnd, const RECT *rect)
static struct window_surface *wayland_window_surface_create(HWND hwnd, const RECT *rect)
{
char buffer[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
BITMAPINFO *info = (BITMAPINFO *)buffer;
@ -516,3 +516,40 @@ void wayland_window_surface_update_wayland_surface(struct window_surface *window
window_surface_unlock(window_surface);
}
/***********************************************************************
* WAYLAND_CreateWindowSurface
*/
BOOL WAYLAND_CreateWindowSurface(HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface)
{
struct wayland_win_data *data;
RECT surface_rect;
TRACE("hwnd %p, swp_flags %08x, visible %s, surface %p\n", hwnd, swp_flags, wine_dbgstr_rect(visible_rect), surface);
if (!(data = wayland_win_data_get(hwnd))) return TRUE; /* use default surface */
/* Release the dummy surface wine provides for toplevels. */
if (*surface) window_surface_release(*surface);
*surface = NULL;
surface_rect = *visible_rect;
OffsetRect(&surface_rect, -surface_rect.left, -surface_rect.top);
/* Check if we can reuse our current window surface. */
if (data->window_surface &&
EqualRect(&data->window_surface->rect, &surface_rect))
{
window_surface_add_ref(data->window_surface);
*surface = data->window_surface;
TRACE("reusing surface %p\n", *surface);
goto done;
}
*surface = wayland_window_surface_create(data->hwnd, &surface_rect);
done:
wayland_win_data_release(data);
return TRUE;
}

View File

@ -2054,8 +2054,8 @@ static const struct window_surface_funcs x11drv_surface_funcs =
/***********************************************************************
* create_surface
*/
struct window_surface *create_surface( HWND hwnd, Window window, const XVisualInfo *vis, const RECT *rect,
COLORREF color_key, BOOL use_alpha )
static struct window_surface *create_surface( HWND hwnd, Window window, const XVisualInfo *vis, const RECT *rect,
COLORREF color_key, BOOL use_alpha )
{
const XPixmapFormatValues *format = pixmap_formats[vis->depth];
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
@ -2182,3 +2182,99 @@ HRGN expose_surface( struct window_surface *window_surface, const RECT *rect )
window_surface_unlock( window_surface );
return region;
}
BOOL get_surface_rect( const RECT *visible_rect, RECT *surface_rect )
{
*surface_rect = NtUserGetVirtualScreenRect();
if (!intersect_rect( surface_rect, surface_rect, visible_rect )) return FALSE;
OffsetRect( surface_rect, -visible_rect->left, -visible_rect->top );
surface_rect->left &= ~31;
surface_rect->top &= ~31;
surface_rect->right = max( surface_rect->left + 32, (surface_rect->right + 31) & ~31 );
surface_rect->bottom = max( surface_rect->top + 32, (surface_rect->bottom + 31) & ~31 );
return TRUE;
}
/***********************************************************************
* CreateWindowSurface (X11DRV.@)
*/
BOOL X11DRV_CreateWindowSurface( HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface )
{
struct x11drv_win_data *data;
RECT surface_rect;
DWORD flags;
COLORREF key;
BOOL layered = NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED;
TRACE( "hwnd %p, swp_flags %08x, visible %s, surface %p\n", hwnd, swp_flags, wine_dbgstr_rect( visible_rect ), surface );
if (!(data = get_win_data( hwnd ))) return TRUE; /* use default surface */
if (*surface) window_surface_release( *surface );
*surface = NULL; /* indicate that we want to draw directly to the window */
if (data->embedded) goto done; /* draw directly to the window */
if (data->whole_window == root_window) goto done; /* draw directly to the window */
if (data->client_window) goto done; /* draw directly to the window */
if (!client_side_graphics && !layered) goto done; /* draw directly to the window */
if (!get_surface_rect( visible_rect, &surface_rect )) goto done;
if (data->surface)
{
if (EqualRect( &data->surface->rect, &surface_rect ))
{
/* existing surface is good enough */
window_surface_add_ref( data->surface );
*surface = data->surface;
goto done;
}
}
else if (!(swp_flags & SWP_SHOWWINDOW) && !(NtUserGetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE)) goto done;
if (!layered || !NtUserGetLayeredWindowAttributes( hwnd, &key, NULL, &flags ) || !(flags & LWA_COLORKEY))
key = CLR_INVALID;
*surface = create_surface( data->hwnd, data->whole_window, &data->vis, &surface_rect, key, FALSE );
done:
release_win_data( data );
return TRUE;
}
/*****************************************************************************
* CreateLayeredWindow (X11DRV.@)
*/
BOOL X11DRV_CreateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF color_key,
struct window_surface **window_surface )
{
struct window_surface *surface;
struct x11drv_win_data *data;
RECT rect;
if (!(data = get_win_data( hwnd ))) return FALSE;
data->layered = TRUE;
if (!data->embedded && argb_visual.visualid) set_window_visual( data, &argb_visual, TRUE );
rect = *window_rect;
OffsetRect( &rect, -window_rect->left, -window_rect->top );
surface = data->surface;
if (!surface || !EqualRect( &surface->rect, &rect ))
{
data->surface = create_surface( data->hwnd, data->whole_window, &data->vis, &rect,
color_key, data->use_alpha );
if (surface) window_surface_release( surface );
surface = data->surface;
}
else set_surface_color_key( surface, color_key );
if ((*window_surface = surface)) window_surface_add_ref( surface );
release_win_data( data );
return TRUE;
}

View File

@ -2576,20 +2576,6 @@ done:
}
static inline BOOL get_surface_rect( const RECT *visible_rect, RECT *surface_rect )
{
*surface_rect = NtUserGetVirtualScreenRect();
if (!intersect_rect( surface_rect, surface_rect, visible_rect )) return FALSE;
OffsetRect( surface_rect, -visible_rect->left, -visible_rect->top );
surface_rect->left &= ~31;
surface_rect->top &= ~31;
surface_rect->right = max( surface_rect->left + 32, (surface_rect->right + 31) & ~31 );
surface_rect->bottom = max( surface_rect->top + 32, (surface_rect->bottom + 31) & ~31 );
return TRUE;
}
/***********************************************************************
* WindowPosChanging (X11DRV.@)
*/
@ -2626,53 +2612,6 @@ done:
}
/***********************************************************************
* CreateWindowSurface (X11DRV.@)
*/
BOOL X11DRV_CreateWindowSurface( HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface )
{
struct x11drv_win_data *data;
RECT surface_rect;
DWORD flags;
COLORREF key;
BOOL layered = NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED;
TRACE( "hwnd %p, swp_flags %08x, visible %s, surface %p\n", hwnd, swp_flags, wine_dbgstr_rect( visible_rect ), surface );
if (!(data = get_win_data( hwnd ))) return TRUE; /* use default surface */
if (*surface) window_surface_release( *surface );
*surface = NULL; /* indicate that we want to draw directly to the window */
if (data->embedded) goto done; /* draw directly to the window */
if (data->whole_window == root_window) goto done; /* draw directly to the window */
if (data->client_window) goto done; /* draw directly to the window */
if (!client_side_graphics && !layered) goto done; /* draw directly to the window */
if (!get_surface_rect( visible_rect, &surface_rect )) goto done;
if (data->surface)
{
if (EqualRect( &data->surface->rect, &surface_rect ))
{
/* existing surface is good enough */
window_surface_add_ref( data->surface );
*surface = data->surface;
goto done;
}
}
else if (!(swp_flags & SWP_SHOWWINDOW) && !(NtUserGetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE)) goto done;
if (!layered || !NtUserGetLayeredWindowAttributes( hwnd, &key, NULL, &flags ) || !(flags & LWA_COLORKEY))
key = CLR_INVALID;
*surface = create_surface( data->hwnd, data->whole_window, &data->vis, &surface_rect, key, FALSE );
done:
release_win_data( data );
return TRUE;
}
/***********************************************************************
* WindowPosChanged (X11DRV.@)
*/
@ -2983,41 +2922,6 @@ void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWO
}
/*****************************************************************************
* CreateLayeredWindow (X11DRV.@)
*/
BOOL X11DRV_CreateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF color_key,
struct window_surface **window_surface )
{
struct window_surface *surface;
struct x11drv_win_data *data;
RECT rect;
if (!(data = get_win_data( hwnd ))) return FALSE;
data->layered = TRUE;
if (!data->embedded && argb_visual.visualid) set_window_visual( data, &argb_visual, TRUE );
rect = *window_rect;
OffsetRect( &rect, -window_rect->left, -window_rect->top );
surface = data->surface;
if (!surface || !EqualRect( &surface->rect, &rect ))
{
data->surface = create_surface( data->hwnd, data->whole_window, &data->vis, &rect,
color_key, data->use_alpha );
if (surface) window_surface_release( surface );
surface = data->surface;
}
else set_surface_color_key( surface, color_key );
if ((*window_surface = surface)) window_surface_add_ref( surface );
release_win_data( data );
return TRUE;
}
/***********************************************************************
* UpdateLayeredWindow (X11DRV.@)
*/

View File

@ -266,8 +266,6 @@ extern Pixmap create_pixmap_from_image( HDC hdc, const XVisualInfo *vis, const B
const struct gdi_image_bits *bits, UINT coloruse );
extern DWORD get_pixmap_image( Pixmap pixmap, int width, int height, const XVisualInfo *vis,
BITMAPINFO *info, struct gdi_image_bits *bits );
extern struct window_surface *create_surface( HWND hwnd, Window window, const XVisualInfo *vis, const RECT *rect,
COLORREF color_key, BOOL use_alpha );
extern void set_surface_color_key( struct window_surface *window_surface, COLORREF color_key );
extern HRGN expose_surface( struct window_surface *window_surface, const RECT *rect );
@ -687,6 +685,7 @@ typedef int (*x11drv_error_callback)( Display *display, XErrorEvent *event, void
extern void X11DRV_expect_error( Display *display, x11drv_error_callback callback, void *arg );
extern int X11DRV_check_error(void);
extern BOOL get_surface_rect( const RECT *visible_rect, RECT *surface_rect );
extern void X11DRV_X_to_window_rect( struct x11drv_win_data *data, RECT *rect, int x, int y, int cx, int cy );
extern POINT virtual_screen_to_root( INT x, INT y );
extern POINT root_to_virtual_screen( INT x, INT y );

View File

@ -662,6 +662,7 @@ SOURCES = \
rmxftmpl.x \
roapi.h \
roerrorapi.h \
rometadata.h \
rometadataresolution.h \
roparameterizediid.idl \
row.idl \
@ -825,12 +826,15 @@ SOURCES = \
windef.h \
windns.h \
windot11.h \
windows.applicationmodel.activation.idl \
windows.applicationmodel.background.idl \
windows.applicationmodel.core.idl \
windows.applicationmodel.idl \
windows.devices.bluetooth.idl \
windows.devices.enumeration.idl \
windows.devices.geolocation.idl \
windows.devices.haptics.idl \
windows.devices.input.idl \
windows.devices.power.idl \
windows.devices.radios.idl \
windows.devices.usb.idl \
@ -886,6 +890,7 @@ SOURCES = \
windows.ui.composition.interop.idl \
windows.ui.core.idl \
windows.ui.idl \
windows.ui.input.idl \
windows.ui.viewmanagement.idl \
windows.ui.xaml.hosting.desktopwindowxamlsource.idl \
windowscontracts.idl \

View File

@ -274,6 +274,8 @@ NTSTATUS WINAPI PsSetLoadImageNotifyRoutine(PLOAD_IMAGE_NOTIFY_ROUTINE);
NTSTATUS WINAPI PsSetLoadImageNotifyRoutineEx(PLOAD_IMAGE_NOTIFY_ROUTINE,ULONG_PTR);
LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
void WINAPI RtlCopyString(STRING*,const STRING*);
void * WINAPI RtlEnumerateGenericTableWithoutSplaying(PRTL_GENERIC_TABLE,PVOID*);
void * WINAPI RtlEnumerateGenericTableWithoutSplayingAvl(PRTL_AVL_TABLE,PVOID*);
BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
void * WINAPI RtlGetElementGenericTable(PRTL_GENERIC_TABLE,ULONG);
void WINAPI RtlInitializeGenericTable(PRTL_GENERIC_TABLE,PRTL_GENERIC_COMPARE_ROUTINE,PRTL_GENERIC_ALLOCATE_ROUTINE,PRTL_GENERIC_FREE_ROUTINE,void *);
@ -283,6 +285,7 @@ void * WINAPI RtlLookupElementGenericTable(PRTL_GENERIC_TABLE,void *);
void * WINAPI RtlLookupElementGenericTableAvl(PRTL_AVL_TABLE,void *);
void WINAPI RtlMapGenericMask(ACCESS_MASK*,const GENERIC_MAPPING*);
ULONG WINAPI RtlNumberGenericTableElements(PRTL_GENERIC_TABLE);
ULONG WINAPI RtlNumberGenericTableElementsAvl(PRTL_AVL_TABLE);
BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
NTSTATUS WINAPI RtlUpcaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
char WINAPI RtlUpperChar(char);

24
include/rometadata.h Normal file
View File

@ -0,0 +1,24 @@
/*
* Copyright 2024 Zhiyi Zhang for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _ROMETADATA_H_
#define _ROMETADATA_H_
STDAPI MetaDataGetDispenser(REFCLSID rclsid, REFIID riid, VOID **obj);
#endif /* _ROMETADATA_H_ */

View File

@ -0,0 +1,198 @@
/*
* Copyright (C) 2024 Zhiyi Zhang for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef __WIDL__
#pragma winrt ns_prefix
#endif
#ifndef DO_NO_IMPORTS
import "inspectable.idl";
import "asyncinfo.idl";
import "eventtoken.idl";
import "windowscontracts.idl";
import "windows.foundation.idl";
import "windows.applicationmodel.background.idl";
import "windows.applicationmodel.core.idl";
import "windows.storage.idl";
import "windows.system.idl";
#endif
namespace Windows.ApplicationModel.Background {
interface IBackgroundTaskInstance;
runtimeclass BackgroundTaskRegistrationGroup;
}
namespace Windows.ApplicationModel.Core {
runtimeclass CoreApplicationView;
}
namespace Windows.ApplicationModel.Activation {
typedef enum ActivationKind ActivationKind;
typedef enum ApplicationExecutionState ApplicationExecutionState;
interface IActivatedEventArgs;
interface IBackgroundActivatedEventArgs;
interface ISplashScreen;
runtimeclass BackgroundActivatedEventArgs;
runtimeclass SplashScreen;
declare {
interface Windows.Foundation.EventHandler<Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Activation.SplashScreen *, IInspectable *>;
interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *, Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Activation.IActivatedEventArgs *>;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
enum ActivationKind
{
Launch = 0,
Search = 1,
ShareTarget = 2,
File = 3,
Protocol = 4,
FileOpenPicker = 5,
FileSavePicker = 6,
CachedFileUpdater = 7,
ContactPicker = 8,
Device = 9,
PrintTaskSettings = 10,
CameraSettings = 11,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
RestrictedLaunch = 12,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
AppointmentsProvider = 13,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
Contact = 14,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
LockScreenCall = 15,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
VoiceCommand = 16,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
LockScreen = 17,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
PickerReturned = 1000,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
WalletAction = 1001,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
PickFileContinuation = 1002,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
PickSaveFileContinuation = 1003,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
PickFolderContinuation = 1004,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
WebAuthenticationBrokerContinuation = 1005,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
WebAccountProvider = 1006,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
ComponentUI = 1007,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
ProtocolForResults = 1009,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
ToastNotification = 1010,
[contract(Windows.Foundation.UniversalApiContract, 2.0)]
Print3DWorkflow = 1011,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
DialReceiver = 1012,
[contract(Windows.Foundation.UniversalApiContract, 2.0)]
DevicePairing = 1013,
[contract(Windows.Foundation.UniversalApiContract, 3.0)]
UserDataAccountsProvider = 1014,
[contract(Windows.Foundation.UniversalApiContract, 3.0)]
FilePickerExperience = 1015,
[contract(Windows.Foundation.UniversalApiContract, 4.0)]
LockScreenComponent = 1016,
[contract(Windows.Foundation.UniversalApiContract, 4.0)]
ContactPanel = 1017,
[contract(Windows.Foundation.UniversalApiContract, 5.0)]
PrintWorkflowForegroundTask = 1018,
[contract(Windows.Foundation.UniversalApiContract, 5.0)]
GameUIProvider = 1019,
[contract(Windows.Foundation.UniversalApiContract, 5.0)]
StartupTask = 1020,
[contract(Windows.Foundation.UniversalApiContract, 5.0)]
CommandLineLaunch = 1021,
[contract(Windows.Foundation.UniversalApiContract, 6.0)]
BarcodeScannerProvider = 1022
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
enum ApplicationExecutionState
{
NotRunning = 0,
Running = 1,
Suspended = 2,
Terminated = 3,
ClosedByUser = 4
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(cf651713-cd08-4fd8-b697-a281b6544e2e)
]
interface IActivatedEventArgs : IInspectable
{
[propget] HRESULT Kind([out, retval] Windows.ApplicationModel.Activation.ActivationKind *value);
[propget] HRESULT PreviousExecutionState([out, retval] Windows.ApplicationModel.Activation.ApplicationExecutionState *value);
[propget] HRESULT SplashScreen([out, retval] Windows.ApplicationModel.Activation.SplashScreen **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
uuid(ab14bee0-e760-440e-a91c-44796de3a92d)
]
interface IBackgroundActivatedEventArgs : IInspectable
{
[propget] HRESULT TaskInstance([out, retval] Windows.ApplicationModel.Background.IBackgroundTaskInstance **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Activation.SplashScreen),
uuid(ca4d975c-d4d6-43f0-97c0-0833c6391c24)
]
interface ISplashScreen : IInspectable
{
[propget] HRESULT ImageLocation([out, retval] Windows.Foundation.Rect *value);
[eventadd] HRESULT Dismissed([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Activation.SplashScreen *, IInspectable *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT Dismissed([in] EventRegistrationToken cookie);
}
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
marshaling_behavior(agile)
]
runtimeclass BackgroundActivatedEventArgs
{
[default] interface Windows.ApplicationModel.Activation.IBackgroundActivatedEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
runtimeclass SplashScreen
{
[default] interface Windows.ApplicationModel.Activation.ISplashScreen;
}
}

View File

@ -0,0 +1,310 @@
/*
* Copyright (C) 2024 Zhiyi Zhang for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef __WIDL__
#pragma winrt ns_prefix
#endif
#ifndef DO_NO_IMPORTS
import "inspectable.idl";
import "asyncinfo.idl";
import "eventtoken.idl";
import "windowscontracts.idl";
import "windows.foundation.idl";
import "windows.applicationmodel.activation.idl";
import "windows.storage.idl";
import "windows.system.idl";
#endif
namespace Windows.ApplicationModel.Activation {
runtimeclass BackgroundActivatedEventArgs;
}
namespace Windows.ApplicationModel.Background {
runtimeclass BackgroundTaskRegistrationGroup;
}
namespace Windows.ApplicationModel.Activation {
declare {
interface Windows.Foundation.EventHandler<Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *, Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>;
}
}
namespace Windows.ApplicationModel.Background {
typedef enum BackgroundTaskCancellationReason BackgroundTaskCancellationReason;
interface IBackgroundTaskCompletedEventArgs;
interface IBackgroundTaskDeferral;
interface IBackgroundTaskProgressEventArgs;
interface IBackgroundTaskInstance;
interface IBackgroundTaskRegistration;
interface IBackgroundTaskRegistration2;
interface IBackgroundTaskRegistration3;
interface IBackgroundTaskRegistrationGroup;
interface IBackgroundTaskRegistrationGroupFactory;
interface IBackgroundTaskRegistrationStatics;
interface IBackgroundTaskRegistrationStatics2;
interface IBackgroundTrigger;
runtimeclass BackgroundTaskCompletedEventArgs;
runtimeclass BackgroundTaskDeferral;
runtimeclass BackgroundTaskProgressEventArgs;
runtimeclass BackgroundTaskRegistration;
runtimeclass BackgroundTaskRegistrationGroup;
declare {
interface Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.BackgroundTaskRegistration *>;
interface Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.IBackgroundTaskRegistration *>;
interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *>;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
enum BackgroundTaskCancellationReason
{
Abort = 0,
Terminating = 1,
LoggingOff = 2,
ServicingUpdate = 3,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] IdleTask = 4,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] Uninstall = 5,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] ConditionLoss = 6,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] SystemPolicy = 7,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] QuietHoursEntered = 8,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] ExecutionTimeExceeded = 9,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] ResourceRevocation = 10,
[contract(Windows.Foundation.UniversalApiContract, 1.0)] EnergySaver = 11
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(a6c4bac0-51f8-4c57-ac3f-156dd1680c4f)
]
delegate
HRESULT BackgroundTaskCanceledEventHandler([in] Windows.ApplicationModel.Background.IBackgroundTaskInstance *sender, [in] Windows.ApplicationModel.Background.BackgroundTaskCancellationReason reason);
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(5B38E929-A086-46A7-A678-439135822BCF)
]
delegate
HRESULT BackgroundTaskCompletedEventHandler([in] Windows.ApplicationModel.Background.BackgroundTaskRegistration *sender, [in] Windows.ApplicationModel.Background.BackgroundTaskCompletedEventArgs *args);
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(46e0683c-8a88-4c99-804c-76897f6277a6)
]
delegate
HRESULT BackgroundTaskProgressEventHandler([in] Windows.ApplicationModel.Background.BackgroundTaskRegistration *sender, [in] Windows.ApplicationModel.Background.BackgroundTaskProgressEventArgs *args);
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskCompletedEventArgs),
uuid(565d25cf-f209-48f4-9967-2b184f7bfbf0)
]
interface IBackgroundTaskCompletedEventArgs : IInspectable
{
[propget] HRESULT InstanceId([out, retval] GUID *value);
HRESULT CheckResult();
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskDeferral),
uuid(93cc156d-af27-4dd3-846e-24ee40cadd25)
]
interface IBackgroundTaskDeferral : IInspectable
{
HRESULT Complete();
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskProgressEventArgs),
uuid(fb1468ac-8332-4d0a-9532-03eae684da31)
]
interface IBackgroundTaskProgressEventArgs : IInspectable
{
[propget] HRESULT InstanceId([out, retval] GUID *value);
[propget] HRESULT Progress([out, retval] UINT32 *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(865bda7a-21d8-4573-8f32-928a1b0641f6)
]
interface IBackgroundTaskInstance : IInspectable
{
[propget] HRESULT InstanceId([out, retval] GUID *value);
[propget] HRESULT Task([out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistration **task);
[propget] HRESULT Progress([out, retval] UINT32 *value);
[propput] HRESULT Progress([in] UINT32 value);
[propget] HRESULT TriggerDetails([out, retval] IInspectable **details);
[eventadd] HRESULT Canceled([in] Windows.ApplicationModel.Background.BackgroundTaskCanceledEventHandler *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT Canceled([in] EventRegistrationToken cookie);
[propget] HRESULT SuspendedCount([out, retval] UINT32 *value);
HRESULT GetDeferral([out, retval] Windows.ApplicationModel.Background.BackgroundTaskDeferral **deferral);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(10654cc2-a26e-43bf-8c12-1fb40dbfbfa0)
]
interface IBackgroundTaskRegistration : IInspectable
{
[propget] HRESULT TaskId([out, retval] GUID *value);
[propget] HRESULT Name([out, retval] HSTRING *value);
[eventadd] HRESULT Progress([in] Windows.ApplicationModel.Background.BackgroundTaskProgressEventHandler *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT Progress([in] EventRegistrationToken cookie);
[eventadd] HRESULT Completed([in] Windows.ApplicationModel.Background.BackgroundTaskCompletedEventHandler *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT Completed([in] EventRegistrationToken cookie);
HRESULT Unregister([in] boolean cancel_task);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(6138c703-bb86-4112-afc3-7f939b166e3b)
]
interface IBackgroundTaskRegistration2 : IInspectable
requires Windows.ApplicationModel.Background.IBackgroundTaskRegistration
{
[propget] HRESULT Trigger([out, retval] Windows.ApplicationModel.Background.IBackgroundTrigger **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 4.0),
uuid(fe338195-9423-4d8b-830d-b1dd2c7badd5)
]
interface IBackgroundTaskRegistration3 : IInspectable
requires Windows.ApplicationModel.Background.IBackgroundTaskRegistration
{
[propget] HRESULT TaskGroup([out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 4.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup),
uuid(2ab1919a-871b-4167-8a76-055cd67b5b23)
]
interface IBackgroundTaskRegistrationGroup : IInspectable
{
[propget] HRESULT Id([out, retval] HSTRING *value);
[propget] HRESULT Name([out, retval] HSTRING *value);
[eventadd] HRESULT BackgroundActivated([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *, Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT BackgroundActivated([in] EventRegistrationToken token);
[propget] HRESULT AllTasks([out, retval] Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.BackgroundTaskRegistration *> **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 4.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup),
uuid(83d92b69-44cf-4631-9740-03c7d8741bc5)
]
interface IBackgroundTaskRegistrationGroupFactory : IInspectable
{
HRESULT Create([in] HSTRING id, [out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **group);
HRESULT CreateWithName([in] HSTRING id, [in] HSTRING name, [out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **group);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistration),
uuid(4c542f69-b000-42ba-a093-6a563c65e3f8)
]
interface IBackgroundTaskRegistrationStatics : IInspectable
{
[propget] HRESULT AllTasks([out, retval] Windows.Foundation.Collections.IMapView<GUID, Windows.ApplicationModel.Background.IBackgroundTaskRegistration *> **tasks);
}
[
contract(Windows.Foundation.UniversalApiContract, 4.0),
exclusiveto(Windows.ApplicationModel.Background.BackgroundTaskRegistration),
uuid(174b671e-b20d-4fa9-ad9a-e93ad6c71e01)
]
interface IBackgroundTaskRegistrationStatics2 : IInspectable
{
[propget] HRESULT AllTaskGroups([out, retval] Windows.Foundation.Collections.IMapView<HSTRING, Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup *> **value);
HRESULT GetTaskGroup([in] HSTRING groupId, [out, retval] Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(84b3a058-6027-4b87-9790-bdf3f757dbd7)
]
interface IBackgroundTrigger : IInspectable
{
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
threading(both)
]
runtimeclass BackgroundTaskCompletedEventArgs
{
[default] interface Windows.ApplicationModel.Background.IBackgroundTaskCompletedEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
threading(mta)
]
runtimeclass BackgroundTaskDeferral
{
[default] interface Windows.ApplicationModel.Background.IBackgroundTaskDeferral;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
threading(both)
]
runtimeclass BackgroundTaskProgressEventArgs
{
[default] interface Windows.ApplicationModel.Background.IBackgroundTaskProgressEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
static(Windows.ApplicationModel.Background.IBackgroundTaskRegistrationStatics, Windows.Foundation.UniversalApiContract, 1.0),
static(Windows.ApplicationModel.Background.IBackgroundTaskRegistrationStatics2, Windows.Foundation.UniversalApiContract, 4.0),
threading(both)
]
runtimeclass BackgroundTaskRegistration
{
[default] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistration;
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistration2;
[contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistration3;
}
[
activatable(Windows.ApplicationModel.Background.IBackgroundTaskRegistrationGroupFactory, Windows.Foundation.UniversalApiContract, 4.0),
contract(Windows.Foundation.UniversalApiContract, 4.0),
marshaling_behavior(agile),
threading(both)
]
runtimeclass BackgroundTaskRegistrationGroup
{
[default] interface Windows.ApplicationModel.Background.IBackgroundTaskRegistrationGroup;
}
}

View File

@ -25,16 +25,99 @@ import "windows.foundation.idl";
import "windows.storage.idl";
import "windows.system.idl";
import "windows.applicationmodel.idl";
import "windows.applicationmodel.activation.idl";
import "windows.ui.core.idl";
#endif
namespace Windows.ApplicationModel.Core {
runtimeclass CoreApplicationView;
}
namespace Windows.ApplicationModel.Activation {
interface IActivatedEventArgs;
runtimeclass BackgroundActivatedEventArgs;
declare {
interface Windows.Foundation.EventHandler<Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Activation.IActivatedEventArgs *>;
}
}
namespace Windows.ApplicationModel {
runtimeclass AppDisplayInfo;
runtimeclass EnteredBackgroundEventArgs;
runtimeclass LeavingBackgroundEventArgs;
runtimeclass SuspendingEventArgs;
declare {
interface Windows.Foundation.EventHandler<Windows.ApplicationModel.EnteredBackgroundEventArgs *>;
interface Windows.Foundation.EventHandler<Windows.ApplicationModel.LeavingBackgroundEventArgs *>;
interface Windows.Foundation.EventHandler<Windows.ApplicationModel.SuspendingEventArgs *>;
}
}
namespace Windows.Foundation {
interface IGetActivationFactory;
}
namespace Windows.UI.Core {
runtimeclass CoreDispatcher;
runtimeclass CoreWindow;
}
namespace Windows.ApplicationModel.Core {
typedef enum AppRestartFailureReason AppRestartFailureReason;
interface IAppListEntry;
interface ICoreApplication;
interface ICoreApplication2;
interface ICoreApplication3;
interface ICoreApplicationExit;
interface ICoreApplicationUnhandledError;
interface ICoreApplicationUseCount;
interface ICoreApplicationView;
interface ICoreApplicationView2;
interface ICoreApplicationView3;
interface ICoreApplicationView5;
interface ICoreApplicationView6;
interface ICoreApplicationViewTitleBar;
interface ICoreImmersiveApplication;
interface ICoreImmersiveApplication2;
interface ICoreImmersiveApplication3;
interface IFrameworkView;
interface IFrameworkViewSource;
interface IHostedViewClosingEventArgs;
interface IUnhandledError;
interface IUnhandledErrorDetectedEventArgs;
runtimeclass AppListEntry;
runtimeclass CoreApplication;
runtimeclass CoreApplicationView;
runtimeclass CoreApplicationViewTitleBar;
runtimeclass HostedViewClosingEventArgs;
runtimeclass UnhandledError;
runtimeclass UnhandledErrorDetectedEventArgs;
declare {
interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.ApplicationModel.Core.AppRestartFailureReason>;
interface Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.CoreApplicationView *>;
interface Windows.Foundation.EventHandler<Windows.ApplicationModel.Core.UnhandledErrorDetectedEventArgs *>;
interface Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Core.AppRestartFailureReason>;
interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Core.HostedViewClosingEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationViewTitleBar *, IInspectable *>;
}
[
contract(Windows.Foundation.UniversalApiContract, 5.0)
]
enum AppRestartFailureReason
{
RestartPending = 0,
NotInForeground = 1,
InvalidUser = 2,
Other = 3
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
@ -47,6 +130,248 @@ namespace Windows.ApplicationModel.Core {
HRESULT LaunchAsync([out, retval] Windows.Foundation.IAsyncOperation<boolean> **operation);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
uuid(0aacf7a4-5e1d-49df-8034-fb6a68bc5ed1)
]
interface ICoreApplication : IInspectable
{
[propget] HRESULT Id([out, retval] HSTRING *value);
[eventadd] HRESULT Suspending([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.SuspendingEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT Suspending([in] EventRegistrationToken token);
[eventadd] HRESULT Resuming([in] Windows.Foundation.EventHandler<IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT Resuming([in] EventRegistrationToken token);
[propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IPropertySet **value);
HRESULT GetCurrentView([out, retval] Windows.ApplicationModel.Core.CoreApplicationView **value);
HRESULT Run([in] Windows.ApplicationModel.Core.IFrameworkViewSource *view_source);
HRESULT RunWithActivationFactories([in] Windows.Foundation.IGetActivationFactory *factory);
}
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
uuid(998681fb-1ab6-4b7f-be4a-9a0645224c04)
]
interface ICoreApplication2 : IInspectable
{
[eventadd] HRESULT BackgroundActivated([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.Activation.BackgroundActivatedEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT BackgroundActivated([in] EventRegistrationToken token);
[eventadd] HRESULT LeavingBackground([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.LeavingBackgroundEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT LeavingBackground([in] EventRegistrationToken token);
[eventadd] HRESULT EnteredBackground([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.EnteredBackgroundEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT EnteredBackground([in] EventRegistrationToken token);
HRESULT EnablePrelaunch([in] boolean value);
}
[
contract(Windows.Foundation.UniversalApiContract, 5.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
uuid(feec0d39-598b-4507-8a67-772632580a57)
]
interface ICoreApplication3 : IInspectable
{
HRESULT RequestRestartAsync([in] HSTRING launch_arguments, [out, retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Core.AppRestartFailureReason> **operation);
HRESULT RequestRestartForUserAsync([in] Windows.System.User *user, [in] HSTRING launch_arguments, [out, retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.Core.AppRestartFailureReason> **operation);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
uuid(cf86461d-261e-4b72-9acd-44ed2ace6a29)
]
interface ICoreApplicationExit : IInspectable
{
HRESULT Exit();
[eventadd] HRESULT Exiting([in] Windows.Foundation.EventHandler<IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT Exiting([in] EventRegistrationToken token);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(f0e24ab0-dd09-42e1-b0bc-e0e131f78d7e)
]
interface ICoreApplicationUnhandledError : IInspectable
{
[eventadd] HRESULT UnhandledErrorDetected([in] Windows.Foundation.EventHandler<Windows.ApplicationModel.Core.UnhandledErrorDetectedEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT UnhandledErrorDetected([in] EventRegistrationToken token);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
uuid(518dc408-c077-475b-809e-0bc0c57e4b74)
]
interface ICoreApplicationUseCount : IInspectable
{
HRESULT IncrementApplicationUseCount();
HRESULT DecrementApplicationUseCount();
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView),
uuid(638bb2db-451d-4661-b099-414f34ffb9f1)
]
interface ICoreApplicationView : IInspectable
{
[propget] HRESULT CoreWindow([out, retval] Windows.UI.Core.CoreWindow **value);
[eventadd] HRESULT Activated([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Activation.IActivatedEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT Activated([in] EventRegistrationToken token);
[propget] HRESULT IsMain([out, retval] boolean *value);
[propget] HRESULT IsHosted([out, retval] boolean *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView),
uuid(68eb7adf-917f-48eb-9aeb-7de53e086ab1)
]
interface ICoreApplicationView2 : IInspectable
{
[propget] HRESULT Dispatcher([out, retval] Windows.UI.Core.CoreDispatcher **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView),
uuid(07ebe1b3-a4cf-4550-ab70-b07e85330bc8)
]
interface ICoreApplicationView3 : IInspectable
{
[propget] HRESULT IsComponent([out, retval] boolean *value);
[propget] HRESULT TitleBar([out, retval] Windows.ApplicationModel.Core.CoreApplicationViewTitleBar **value);
[eventadd] HRESULT HostedViewClosing([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationView *, Windows.ApplicationModel.Core.HostedViewClosingEventArgs *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT HostedViewClosing([in] EventRegistrationToken token);
}
[
contract(Windows.Foundation.UniversalApiContract, 4.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView),
uuid(2bc095a8-8ef0-446d-9e60-3a3e0428c671)
]
interface ICoreApplicationView5 : IInspectable
{
[propget] HRESULT Properties([out, retval] Windows.Foundation.Collections.IPropertySet **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 5.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplicationView),
uuid(c119d49a-0679-49ba-803f-b79c5cf34cca)
]
interface ICoreApplicationView6 : IInspectable
{
[propget] HRESULT DispatcherQueue([out, retval] Windows.System.DispatcherQueue **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplicationViewTitleBar),
uuid(006d35e3-e1f1-431b-9508-29b96926ac53)
]
interface ICoreApplicationViewTitleBar : IInspectable
{
[propput] HRESULT ExtendViewIntoTitleBar([in] boolean value);
[propget] HRESULT ExtendViewIntoTitleBar([out, retval] boolean *value);
[propget] HRESULT SystemOverlayLeftInset([out, retval] DOUBLE *value);
[propget] HRESULT SystemOverlayRightInset([out, retval] DOUBLE *value);
[propget] HRESULT Height([out, retval] DOUBLE *value);
[eventadd] HRESULT LayoutMetricsChanged([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationViewTitleBar *, IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT LayoutMetricsChanged([in] EventRegistrationToken token);
[propget] HRESULT IsVisible([out, retval] boolean *value);
[eventadd] HRESULT IsVisibleChanged([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.Core.CoreApplicationViewTitleBar *, IInspectable *> *handler, [out, retval] EventRegistrationToken *token);
[eventremove] HRESULT IsVisibleChanged([in] EventRegistrationToken token);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
uuid(1ada0e3e-e4a2-4123-b451-dc96bf800419)
]
interface ICoreImmersiveApplication : IInspectable
{
[propget] HRESULT Views([out, retval] Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.CoreApplicationView *> **value);
[overload("CreateNewView"), default_overload]
HRESULT CreateNewView([in] HSTRING runtime_type, [in] HSTRING entry_point, [out, retval] Windows.ApplicationModel.Core.CoreApplicationView **view);
[propget] HRESULT MainView([out, retval] Windows.ApplicationModel.Core.CoreApplicationView **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
uuid(828e1e36-e9e3-4cfc-9b66-48b78ea9bb2c)
]
interface ICoreImmersiveApplication2 : IInspectable
{
[overload("CreateNewView")]
HRESULT CreateNewViewFromMainView([out, retval] Windows.ApplicationModel.Core.CoreApplicationView **view);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.CoreApplication),
uuid(34a05b2f-ee0d-41e5-8314-cf10c91bf0af)
]
interface ICoreImmersiveApplication3 : IInspectable
{
[overload("CreateNewView")]
HRESULT CreateNewViewWithViewSource([in] Windows.ApplicationModel.Core.IFrameworkViewSource *view_source, [out, retval] Windows.ApplicationModel.Core.CoreApplicationView **view);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(faab5cd0-8924-45ac-ad0f-a08fae5d0324)
]
interface IFrameworkView : IInspectable
{
HRESULT Initialize([in] Windows.ApplicationModel.Core.CoreApplicationView *application_view);
HRESULT SetWindow([in] Windows.UI.Core.CoreWindow *window);
HRESULT Load([in] HSTRING entry_point);
HRESULT Run();
HRESULT Uninitialize();
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(cd770614-65c4-426c-9494-34fc43554862)
]
interface IFrameworkViewSource : IInspectable
{
HRESULT CreateView([out, retval] Windows.ApplicationModel.Core.IFrameworkView **view);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.HostedViewClosingEventArgs),
uuid(d238943c-b24e-4790-acb5-3e4243c4ff87)
]
interface IHostedViewClosingEventArgs : IInspectable
{
HRESULT GetDeferral([out, retval] Windows.Foundation.Deferral **result);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.UnhandledError),
uuid(9459b726-53b5-4686-9eaf-fa8162dc3980)
]
interface IUnhandledError : IInspectable
{
[propget] HRESULT Handled([out, retval] boolean *value);
HRESULT Propagate();
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Core.UnhandledErrorDetectedEventArgs),
uuid(679ab78b-b336-4822-ac40-0d750f0b7a2b)
]
interface IUnhandledErrorDetectedEventArgs : IInspectable
{
[propget] HRESULT UnhandledError([out, retval] Windows.ApplicationModel.Core.UnhandledError **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
@ -59,4 +384,72 @@ namespace Windows.ApplicationModel.Core {
[contract(Windows.Foundation.UniversalApiContract, 6.0)] interface Windows.ApplicationModel.Core.IAppListEntry3;
[contract(Windows.Foundation.UniversalApiContract, 11.0)] interface Windows.ApplicationModel.Core.IAppListEntry4;
}
#ifndef _WINDOWS_APPLICATIONMODEL
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
static(Windows.ApplicationModel.Core.ICoreApplication, Windows.Foundation.UniversalApiContract, 1.0),
static(Windows.ApplicationModel.Core.ICoreApplication2, Windows.Foundation.UniversalApiContract, 3.0),
static(Windows.ApplicationModel.Core.ICoreApplication3, Windows.Foundation.UniversalApiContract, 5.0),
static(Windows.ApplicationModel.Core.ICoreApplicationExit, Windows.Foundation.UniversalApiContract, 1.0),
static(Windows.ApplicationModel.Core.ICoreApplicationUnhandledError, Windows.Foundation.UniversalApiContract, 1.0),
static(Windows.ApplicationModel.Core.ICoreApplicationUseCount, Windows.Foundation.UniversalApiContract, 1.0),
static(Windows.ApplicationModel.Core.ICoreImmersiveApplication, Windows.Foundation.UniversalApiContract, 1.0),
static(Windows.ApplicationModel.Core.ICoreImmersiveApplication2, Windows.Foundation.UniversalApiContract, 1.0),
static(Windows.ApplicationModel.Core.ICoreImmersiveApplication3, Windows.Foundation.UniversalApiContract, 1.0)
]
runtimeclass CoreApplication
{
}
#endif
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass CoreApplicationView
{
[default] interface Windows.ApplicationModel.Core.ICoreApplicationView;
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView2;
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView3;
[contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView5;
[contract(Windows.Foundation.UniversalApiContract, 5.0)] interface Windows.ApplicationModel.Core.ICoreApplicationView6;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass CoreApplicationViewTitleBar
{
[default] interface Windows.ApplicationModel.Core.ICoreApplicationViewTitleBar;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile)
]
runtimeclass HostedViewClosingEventArgs
{
[default] interface Windows.ApplicationModel.Core.IHostedViewClosingEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile)
]
runtimeclass UnhandledError
{
[default] interface Windows.ApplicationModel.Core.IUnhandledError;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile)
]
runtimeclass UnhandledErrorDetectedEventArgs
{
[default] interface Windows.ApplicationModel.Core.IUnhandledErrorDetectedEventArgs;
}
}

View File

@ -24,6 +24,7 @@
import "windows.foundation.idl";
import "windows.storage.idl";
import "windows.system.idl";
import "windows.applicationmodel.activation.idl";
import "windows.applicationmodel.core.idl";
#endif
@ -35,6 +36,8 @@ namespace Windows.ApplicationModel {
typedef struct PackageVersion PackageVersion;
interface IAppDisplayInfo;
interface IEnteredBackgroundEventArgs;
interface ILeavingBackgroundEventArgs;
interface IPackage;
interface IPackage2;
interface IPackage3;
@ -42,17 +45,28 @@ namespace Windows.ApplicationModel {
interface IPackageId;
interface IPackageIdWithMetadata;
interface IPackageStatics;
interface ISuspendingDeferral;
interface ISuspendingEventArgs;
interface ISuspendingOperation;
runtimeclass AppDisplayInfo;
runtimeclass EnteredBackgroundEventArgs;
runtimeclass LeavingBackgroundEventArgs;
runtimeclass Package;
runtimeclass PackageId;
runtimeclass PackageStatus;
runtimeclass SuspendingDeferral;
runtimeclass SuspendingEventArgs;
runtimeclass SuspendingOperation;
declare {
interface Windows.Foundation.Collections.IIterable<Windows.ApplicationModel.Package *>;
interface Windows.Foundation.Collections.IIterator<Windows.ApplicationModel.Package *>;
interface Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Package *>;
interface Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.AppListEntry *>;
interface Windows.Foundation.EventHandler<Windows.ApplicationModel.EnteredBackgroundEventArgs *>;
interface Windows.Foundation.EventHandler<Windows.ApplicationModel.LeavingBackgroundEventArgs *>;
interface Windows.Foundation.EventHandler<Windows.ApplicationModel.SuspendingEventArgs *>;
interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.AppListEntry *> *>;
interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Foundation.Collections.IVectorView<Windows.ApplicationModel.Core.AppListEntry *> *>;
}
@ -80,6 +94,24 @@ namespace Windows.ApplicationModel {
HRESULT GetLogo([in] Windows.Foundation.Size size, [out, retval] Windows.Storage.Streams.RandomAccessStreamReference **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
uuid(f722dcc2-9827-403d-aaed-ecca9ac17398)
]
interface IEnteredBackgroundEventArgs : IInspectable
{
HRESULT GetDeferral([out] [retval] Windows.Foundation.Deferral **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
uuid(39c6ec9a-ae6e-46f9-a07a-cfc23f88733e)
]
interface ILeavingBackgroundEventArgs : IInspectable
{
HRESULT GetDeferral([out] [retval] Windows.Foundation.Deferral **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.ApplicationModel.Package),
@ -180,6 +212,34 @@ namespace Windows.ApplicationModel {
[propget] HRESULT Current([out, retval] Windows.ApplicationModel.Package **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(59140509-8bc9-4eb4-b636-dabdc4f46f66)
]
interface ISuspendingDeferral : IInspectable
{
HRESULT Complete();
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(96061c05-2dba-4d08-b0bd-2b30a131c6aa)
]
interface ISuspendingEventArgs : IInspectable
{
[propget] HRESULT SuspendingOperation([out, retval] Windows.ApplicationModel.SuspendingOperation **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(9da4ca41-20e1-4e9b-9f65-a9f435340c3a)
]
interface ISuspendingOperation : IInspectable
{
HRESULT GetDeferral([out, retval] Windows.ApplicationModel.SuspendingDeferral **deferral);
[propget] HRESULT Deadline([out, retval] Windows.Foundation.DateTime *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
@ -190,6 +250,24 @@ namespace Windows.ApplicationModel {
[default] interface Windows.ApplicationModel.IAppDisplayInfo;
}
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
marshaling_behavior(agile)
]
runtimeclass EnteredBackgroundEventArgs
{
[default] interface Windows.ApplicationModel.IEnteredBackgroundEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
marshaling_behavior(agile)
]
runtimeclass LeavingBackgroundEventArgs
{
[default] interface Windows.ApplicationModel.ILeavingBackgroundEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile),
@ -228,4 +306,31 @@ namespace Windows.ApplicationModel {
[default] interface Windows.ApplicationModel.IPackageId;
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.IPackageIdWithMetadata;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile)
]
runtimeclass SuspendingDeferral
{
[default] interface Windows.ApplicationModel.ISuspendingDeferral;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile)
]
runtimeclass SuspendingEventArgs
{
[default] interface Windows.ApplicationModel.ISuspendingEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile)
]
runtimeclass SuspendingOperation
{
[default] interface Windows.ApplicationModel.ISuspendingOperation;
}
}

View File

@ -0,0 +1,117 @@
/*
* Copyright (C) 2024 Zhiyi Zhang for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef __WIDL__
#pragma winrt ns_prefix
#endif
#ifndef DO_NO_IMPORTS
import "inspectable.idl";
import "asyncinfo.idl";
import "eventtoken.idl";
import "windowscontracts.idl";
import "windows.foundation.idl";
#endif
namespace Windows.Devices.Input {
typedef enum PointerDeviceType PointerDeviceType;
typedef struct PointerDeviceUsage PointerDeviceUsage;
interface IPointerDevice;
interface IPointerDevice2;
interface IPointerDeviceStatics;
runtimeclass PointerDevice;
declare {
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Input.PointerDevice *>;
interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Input.PointerDeviceUsage>;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
enum PointerDeviceType
{
Touch = 0,
Pen = 1,
Mouse = 2
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
struct PointerDeviceUsage
{
UINT32 UsagePage;
UINT32 Usage;
INT32 MinLogical;
INT32 MaxLogical;
INT32 MinPhysical;
INT32 MaxPhysical;
UINT32 Unit;
FLOAT PhysicalMultiplier;
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.Devices.Input.PointerDevice),
uuid(93c9bafc-ebcb-467e-82c6-276feae36b5a)
]
interface IPointerDevice : IInspectable
{
[propget] HRESULT PointerDeviceType([out, retval] Windows.Devices.Input.PointerDeviceType *value);
[propget] HRESULT IsIntegrated([out, retval] boolean *value);
[propget] HRESULT MaxContacts([out, retval] UINT32 *value);
[propget] HRESULT PhysicalDeviceRect([out, retval] Windows.Foundation.Rect *value);
[propget] HRESULT ScreenRect([out, retval] Windows.Foundation.Rect *value);
[propget] HRESULT SupportedUsages([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Input.PointerDeviceUsage> **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.Devices.Input.PointerDevice),
uuid(f8a6d2a0-c484-489f-ae3e-30d2ee1ffd3e)
]
interface IPointerDevice2 : IInspectable
{
[propget] HRESULT MaxPointersWithZDistance([out, retval] UINT32 *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.Devices.Input.PointerDevice),
uuid(d8b89aa1-d1c6-416e-bd8d-5790914dc563)
]
interface IPointerDeviceStatics : IInspectable
{
HRESULT GetPointerDevice([in] UINT32 pointer_id, [out, retval] Windows.Devices.Input.PointerDevice **pointer_device);
HRESULT GetPointerDevices([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Input.PointerDevice *> **pointer_devices);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(none),
static(Windows.Devices.Input.IPointerDeviceStatics, Windows.Foundation.UniversalApiContract, 1.0)
]
runtimeclass PointerDevice
{
[default] interface Windows.Devices.Input.IPointerDevice;
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Devices.Input.IPointerDevice2;
}
}

View File

@ -64,6 +64,7 @@ namespace Windows.Foundation {
interface IClosable;
interface IDeferral;
interface IDeferralFactory;
interface IGetActivationFactory;
interface IMemoryBuffer;
interface IMemoryBufferFactory;
interface IMemoryBufferReference;
@ -109,6 +110,7 @@ namespace Windows.Foundation {
interface Windows.Foundation.IReference<BYTE>;
interface Windows.Foundation.IReference<INT32>;
interface Windows.Foundation.IReference<DOUBLE>;
interface Windows.Foundation.IReference<FLOAT>;
interface Windows.Foundation.IReference<UINT32>;
interface Windows.Foundation.IReference<UINT64>;
interface Windows.Foundation.IReference<Windows.Foundation.DateTime>;
@ -248,6 +250,15 @@ namespace Windows.Foundation {
HRESULT Create([in] Windows.Foundation.DeferralCompletedHandler *handler, [out, retval] Windows.Foundation.Deferral **result);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(4edb8ee2-96dd-49a7-94f7-4607ddab8e3c)
]
interface IGetActivationFactory : IInspectable
{
HRESULT GetActivationFactory([in] HSTRING activatable_class_id, [out, retval] IInspectable **factory);
}
[
contract(Windows.Foundation.FoundationContract, 1.0),
uuid(5a648006-843a-4da9-865b-9d26e5dfad7b)

View File

@ -30,6 +30,8 @@ namespace Windows.System
{
typedef enum DispatcherQueuePriority DispatcherQueuePriority;
typedef enum ProcessorArchitecture ProcessorArchitecture;
typedef enum VirtualKey VirtualKey;
typedef enum VirtualKeyModifiers VirtualKeyModifiers;
interface IDispatcherQueue;
interface IDispatcherQueue2;
@ -83,6 +85,239 @@ namespace Windows.System
Unknown = 65535
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
enum VirtualKey
{
None = 0,
LeftButton = 1,
RightButton = 2,
Cancel = 3,
MiddleButton = 4,
XButton1 = 5,
XButton2 = 6,
Back = 8,
Tab = 9,
Clear = 12,
Enter = 13,
Shift = 16,
Control = 17,
Menu = 18,
Pause = 19,
CapitalLock = 20,
Kana = 21,
Hangul = 21,
[contract(Windows.Foundation.UniversalApiContract, 10.0)]
ImeOn = 22,
Junja = 23,
Final = 24,
Hanja = 25,
Kanji = 25,
[contract(Windows.Foundation.UniversalApiContract, 10.0)]
ImeOff = 26,
Escape = 27,
Convert = 28,
NonConvert = 29,
Accept = 30,
ModeChange = 31,
Space = 32,
PageUp = 33,
PageDown = 34,
End = 35,
Home = 36,
Left = 37,
Up = 38,
Right = 39,
Down = 40,
Select = 41,
Print = 42,
Execute = 43,
Snapshot = 44,
Insert = 45,
Delete = 46,
Help = 47,
Number0 = 48,
Number1 = 49,
Number2 = 50,
Number3 = 51,
Number4 = 52,
Number5 = 53,
Number6 = 54,
Number7 = 55,
Number8 = 56,
Number9 = 57,
A = 65,
B = 66,
C = 67,
D = 68,
E = 69,
F = 70,
G = 71,
H = 72,
I = 73,
J = 74,
K = 75,
L = 76,
M = 77,
N = 78,
O = 79,
P = 80,
Q = 81,
R = 82,
S = 83,
T = 84,
U = 85,
V = 86,
W = 87,
X = 88,
Y = 89,
Z = 90,
LeftWindows = 91,
RightWindows = 92,
Application = 93,
Sleep = 95,
NumberPad0 = 96,
NumberPad1 = 97,
NumberPad2 = 98,
NumberPad3 = 99,
NumberPad4 = 100,
NumberPad5 = 101,
NumberPad6 = 102,
NumberPad7 = 103,
NumberPad8 = 104,
NumberPad9 = 105,
Multiply = 106,
Add = 107,
Separator = 108,
Subtract = 109,
Decimal = 110,
Divide = 111,
F1 = 112,
F2 = 113,
F3 = 114,
F4 = 115,
F5 = 116,
F6 = 117,
F7 = 118,
F8 = 119,
F9 = 120,
F10 = 121,
F11 = 122,
F12 = 123,
F13 = 124,
F14 = 125,
F15 = 126,
F16 = 127,
F17 = 128,
F18 = 129,
F19 = 130,
F20 = 131,
F21 = 132,
F22 = 133,
F23 = 134,
F24 = 135,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
NavigationView = 136,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
NavigationMenu = 137,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
NavigationUp = 138,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
NavigationDown = 139,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
NavigationLeft = 140,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
NavigationRight = 141,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
NavigationAccept = 142,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
NavigationCancel = 143,
NumberKeyLock = 144,
Scroll = 145,
LeftShift = 160,
RightShift = 161,
LeftControl = 162,
RightControl = 163,
LeftMenu = 164,
RightMenu = 165,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GoBack = 166,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GoForward = 167,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
Refresh = 168,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
Stop = 169,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
Search = 170,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
Favorites = 171,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GoHome = 172,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadA = 195,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadB = 196,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadX = 197,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadY = 198,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadRightShoulder = 199,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadLeftShoulder = 200,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadLeftTrigger = 201,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadRightTrigger = 202,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadDPadUp = 203,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadDPadDown = 204,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadDPadLeft = 205,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadDPadRight = 206,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadMenu = 207,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadView = 208,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadLeftThumbstickButton = 209,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadRightThumbstickButton = 210,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadLeftThumbstickUp = 211,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadLeftThumbstickDown = 212,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadLeftThumbstickRight = 213,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadLeftThumbstickLeft = 214,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadRightThumbstickUp = 215,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadRightThumbstickDown = 216,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadRightThumbstickRight = 217,
[contract(Windows.Foundation.UniversalApiContract, 1.0)]
GamepadRightThumbstickLeft = 218
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
flags
]
enum VirtualKeyModifiers
{
None = 0x0,
Control = 0x1,
Menu = 0x2,
Shift = 0x4,
Windows = 0x8
};
[
contract(Windows.Foundation.UniversalApiContract, 5.0),
uuid(dfa2dc9c-1a2d-4917-98f2-939af1d6e0c8)

View File

@ -28,24 +28,113 @@ import "windows.foundation.idl";
import "windows.system.idl";
import "windows.ui.idl";
/* import "windows.ui.composition.idl"; */
/* import "windows.ui.input.idl"; */
import "windows.ui.input.idl";
/* import "windows.ui.input.inking.idl"; */
/* import "windows.ui.input.inking.core.idl"; */
/* import "windows.ui.popups.idl"; */
namespace Windows.UI.Input {
runtimeclass PointerPoint;
declare {
interface Windows.Foundation.Collections.IVectorView<Windows.UI.Input.PointerPoint *>;
interface Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *>;
}
}
namespace Windows.UI.Core {
typedef enum CoreCursorType CoreCursorType;
typedef enum CoreDispatcherPriority CoreDispatcherPriority;
typedef enum CoreProcessEventsOption CoreProcessEventsOption;
typedef enum CoreVirtualKeyStates CoreVirtualKeyStates;
typedef enum CoreWindowActivationMode CoreWindowActivationMode;
typedef enum CoreWindowActivationState CoreWindowActivationState;
typedef enum CoreWindowFlowDirection CoreWindowFlowDirection;
typedef struct CorePhysicalKeyStatus CorePhysicalKeyStatus;
typedef struct CoreProximityEvaluation CoreProximityEvaluation;
interface IAutomationProviderRequestedEventArgs;
interface ICharacterReceivedEventArgs;
interface IClosestInteractiveBoundsRequestedEventArgs;
interface ICoreAcceleratorKeys;
interface ICoreCursor;
interface ICoreCursorFactory;
interface ICoreDispatcher;
interface ICoreDispatcher2;
interface ICoreDispatcherWithTaskPriority;
interface ICoreWindow;
interface ICoreWindow2;
interface ICoreWindow3;
interface ICoreWindow4;
interface ICoreWindow5;
interface ICoreWindowEventArgs;
interface ICoreWindowStatic;
interface IIdleDispatchedHandlerArgs;
interface IInputEnabledEventArgs;
interface IKeyEventArgs;
interface IKeyEventArgs2;
interface IPointerEventArgs;
interface ITouchHitTestingEventArgs;
interface IVisibilityChangedEventArgs;
interface IWindowActivatedEventArgs;
interface IWindowSizeChangedEventArgs;
runtimeclass AutomationProviderRequestedEventArgs;
runtimeclass AcceleratorKeyEventArgs;
runtimeclass CharacterReceivedEventArgs;
runtimeclass ClosestInteractiveBoundsRequestedEventArgs;
runtimeclass CoreCursor;
runtimeclass CoreDispatcher;
runtimeclass CoreWindow;
runtimeclass CoreWindowEventArgs;
runtimeclass IdleDispatchedHandlerArgs;
runtimeclass InputEnabledEventArgs;
runtimeclass KeyEventArgs;
runtimeclass PointerEventArgs;
runtimeclass TouchHitTestingEventArgs;
runtimeclass VisibilityChangedEventArgs;
runtimeclass WindowActivatedEventArgs;
runtimeclass WindowSizeChangedEventArgs;
declare {
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, IInspectable *>;
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.AutomationProviderRequestedEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.CharacterReceivedEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.ClosestInteractiveBoundsRequestedEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.CoreWindowEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.InputEnabledEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.KeyEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.TouchHitTestingEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.VisibilityChangedEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.WindowActivatedEventArgs *>;
interface Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.WindowSizeChangedEventArgs *>;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
enum CoreCursorType
{
Arrow = 0,
Cross = 1,
Custom = 2,
Hand = 3,
Help = 4,
IBeam = 5,
SizeAll = 6,
SizeNortheastSouthwest = 7,
SizeNorthSouth = 8,
SizeNorthwestSoutheast = 9,
SizeWestEast = 10,
UniversalNo = 11,
UpArrow = 12,
Wait = 13,
[contract(Windows.Foundation.UniversalApiContract, 5.0)]
Pin = 14,
[contract(Windows.Foundation.UniversalApiContract, 5.0)]
Person = 15
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
@ -70,6 +159,69 @@ namespace Windows.UI.Core {
ProcessAllIfPresent = 3,
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
flags
]
enum CoreVirtualKeyStates
{
None = 0x0,
Down = 0x1,
Locked = 0x2
};
[
contract(Windows.Foundation.UniversalApiContract, 5.0)
]
enum CoreWindowActivationMode
{
None = 0,
Deactivated = 1,
ActivatedNotForeground = 2,
ActivatedInForeground = 3
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
enum CoreWindowActivationState
{
CodeActivated = 0,
Deactivated = 1,
PointerActivated = 2
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
enum CoreWindowFlowDirection
{
LeftToRight = 0,
RightToLeft = 1
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
struct CorePhysicalKeyStatus
{
UINT32 RepeatCount;
UINT32 ScanCode;
boolean IsExtendedKey;
boolean IsMenuKeyDown;
boolean WasKeyDown;
boolean IsKeyReleased;
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
struct CoreProximityEvaluation
{
INT32 Score;
Windows.Foundation.Point AdjustedPoint;
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(d1f276c4-98d8-4636-bf49-eb79507548e9)
@ -82,6 +234,64 @@ namespace Windows.UI.Core {
]
delegate HRESULT IdleDispatchedHandler([in] Windows.UI.Core.IdleDispatchedHandlerArgs *e);
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.AutomationProviderRequestedEventArgs),
uuid(961ff258-21bf-4b42-a298-fa479d4c52e2)
]
interface IAutomationProviderRequestedEventArgs : IInspectable
requires Windows.UI.Core.ICoreWindowEventArgs
{
[propget] HRESULT AutomationProvider([out, retval] IInspectable **value);
[propput] HRESULT AutomationProvider([in] IInspectable *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.CharacterReceivedEventArgs),
uuid(c584659f-99b2-4bcc-bd33-04e63f42902e)
]
interface ICharacterReceivedEventArgs : IInspectable
requires Windows.UI.Core.ICoreWindowEventArgs
{
[propget] HRESULT KeyCode([out, retval] UINT32 *value);
[propget] HRESULT KeyStatus([out, retval] Windows.UI.Core.CorePhysicalKeyStatus *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
exclusiveto(Windows.UI.Core.ClosestInteractiveBoundsRequestedEventArgs),
uuid(347c11d7-f6f8-40e3-b29f-ae50d3e86486)
]
interface IClosestInteractiveBoundsRequestedEventArgs : IInspectable
{
[propget] HRESULT PointerPosition([out, retval] Windows.Foundation.Point *value);
[propget] HRESULT SearchBounds([out, retval] Windows.Foundation.Rect *value);
[propget] HRESULT ClosestInteractiveBounds([out, retval] Windows.Foundation.Rect *value);
[propput] HRESULT ClosestInteractiveBounds([in] Windows.Foundation.Rect value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.CoreCursor),
uuid(96893acf-111d-442c-8a77-b87992f8e2d6)
]
interface ICoreCursor : IInspectable
{
[propget] HRESULT Id([out, retval] UINT32 *value);
[propget] HRESULT Type([out, retval] Windows.UI.Core.CoreCursorType *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.CoreCursor),
uuid(f6359621-a79d-4ed3-8c32-a9ef9d6b76a4)
]
interface ICoreCursorFactory : IInspectable
{
HRESULT CreateCursor([in] Windows.UI.Core.CoreCursorType type, [in] UINT32 id, [out, retval] Windows.UI.Core.CoreCursor **cursor);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.CoreDispatcher),
@ -97,6 +307,132 @@ namespace Windows.UI.Core {
HRESULT RunIdleAsync([in] Windows.UI.Core.IdleDispatchedHandler *callback, [out, retval] Windows.Foundation.IAsyncAction **action);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(79b9d5f2-879e-4b89-b798-79e47598030c)
]
interface ICoreWindow : IInspectable
{
[propget] HRESULT AutomationHostProvider([out, retval] IInspectable **value);
[propget] HRESULT Bounds([out, retval] Windows.Foundation.Rect *value);
[propget] HRESULT CustomProperties([out, retval] Windows.Foundation.Collections.IPropertySet **value);
[propget] HRESULT Dispatcher([out, retval] Windows.UI.Core.CoreDispatcher **value);
[propget] HRESULT FlowDirection([out, retval] Windows.UI.Core.CoreWindowFlowDirection *value);
[propput] HRESULT FlowDirection([in] Windows.UI.Core.CoreWindowFlowDirection value);
[propget] HRESULT IsInputEnabled([out, retval] boolean *value);
[propput] HRESULT IsInputEnabled([in] boolean value);
[propget] HRESULT PointerCursor([out, retval] Windows.UI.Core.CoreCursor **value);
[propput] HRESULT PointerCursor([in] Windows.UI.Core.CoreCursor *value);
[propget] HRESULT PointerPosition([out, retval] Windows.Foundation.Point *value);
[propget] HRESULT Visible([out, retval] boolean *value);
HRESULT Activate();
HRESULT Close();
HRESULT GetAsyncKeyState([in] Windows.System.VirtualKey key, [out, retval] Windows.UI.Core.CoreVirtualKeyStates *state);
HRESULT GetKeyState([in] Windows.System.VirtualKey key, [out, retval] Windows.UI.Core.CoreVirtualKeyStates *state);
HRESULT ReleasePointerCapture();
HRESULT SetPointerCapture();
[eventadd] HRESULT Activated([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.WindowActivatedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT Activated([in] EventRegistrationToken cookie);
[eventadd] HRESULT AutomationProviderRequested([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.AutomationProviderRequestedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT AutomationProviderRequested([in] EventRegistrationToken cookie);
[eventadd] HRESULT CharacterReceived([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.CharacterReceivedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT CharacterReceived([in] EventRegistrationToken cookie);
[eventadd] HRESULT Closed([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.CoreWindowEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT Closed([in] EventRegistrationToken cookie);
[eventadd] HRESULT InputEnabled([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.InputEnabledEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT InputEnabled([in] EventRegistrationToken cookie);
[eventadd] HRESULT KeyDown([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.KeyEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT KeyDown([in] EventRegistrationToken cookie);
[eventadd] HRESULT KeyUp([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.KeyEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT KeyUp([in] EventRegistrationToken cookie);
[eventadd] HRESULT PointerCaptureLost([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT PointerCaptureLost([in] EventRegistrationToken cookie);
[eventadd] HRESULT PointerEntered([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT PointerEntered([in] EventRegistrationToken cookie);
[eventadd] HRESULT PointerExited([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT PointerExited([in] EventRegistrationToken cookie);
[eventadd] HRESULT PointerMoved([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT PointerMoved([in] EventRegistrationToken cookie);
[eventadd] HRESULT PointerPressed([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT PointerPressed([in] EventRegistrationToken cookie);
[eventadd] HRESULT PointerReleased([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT PointerReleased([in] EventRegistrationToken cookie);
[eventadd] HRESULT TouchHitTesting([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.TouchHitTestingEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT TouchHitTesting([in] EventRegistrationToken cookie);
[eventadd] HRESULT PointerWheelChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.PointerEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT PointerWheelChanged([in] EventRegistrationToken cookie);
[eventadd] HRESULT SizeChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.WindowSizeChangedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT SizeChanged([in] EventRegistrationToken cookie);
[eventadd] HRESULT VisibilityChanged([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.VisibilityChangedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT VisibilityChanged([in] EventRegistrationToken cookie);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.CoreWindow),
uuid(7c2b1b85-6917-4361-9c02-0d9e3a420b95)
]
interface ICoreWindow2 : IInspectable
{
[propput] HRESULT PointerPosition([in] Windows.Foundation.Point value);
}
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
exclusiveto(Windows.UI.Core.CoreWindow),
uuid(32c20dd8-faef-4375-a2ab-32640e4815c7)
]
interface ICoreWindow3 : IInspectable
{
[eventadd] HRESULT ClosestInteractiveBoundsRequested([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, Windows.UI.Core.ClosestInteractiveBoundsRequestedEventArgs *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT ClosestInteractiveBoundsRequested([in] EventRegistrationToken cookie);
HRESULT GetCurrentKeyEventDeviceId([out, retval] HSTRING *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 4.0),
exclusiveto(Windows.UI.Core.CoreWindow),
uuid(35caf0d0-47f0-436c-af97-0dd88f6f5f02)
]
interface ICoreWindow4 : IInspectable
{
[eventadd] HRESULT ResizeStarted([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, IInspectable *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT ResizeStarted([in] EventRegistrationToken cookie);
[eventadd] HRESULT ResizeCompleted([in] Windows.Foundation.TypedEventHandler<Windows.UI.Core.CoreWindow *, IInspectable *> *handler, [out, retval] EventRegistrationToken *cookie);
[eventremove] HRESULT ResizeCompleted([in] EventRegistrationToken cookie);
}
[
contract(Windows.Foundation.UniversalApiContract, 5.0),
exclusiveto(Windows.UI.Core.CoreWindow),
uuid(4b4ae1e1-2e6d-4eaa-bda1-1c5cc1bee141)
]
interface ICoreWindow5 : IInspectable
{
[propget] HRESULT DispatcherQueue([out, retval] Windows.System.DispatcherQueue **value);
[propget] HRESULT ActivationMode([out, retval] Windows.UI.Core.CoreWindowActivationMode *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(272b1ef3-c633-4da5-a26c-c6d0f56b29da)
]
interface ICoreWindowEventArgs : IInspectable
{
[propget] HRESULT Handled([out, retval] boolean *value);
[propput] HRESULT Handled([in] boolean value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.CoreWindow),
uuid(4d239005-3c2a-41b1-9022-536bb9cf93b1)
]
interface ICoreWindowStatic : IInspectable
{
HRESULT GetForCurrentThread([out, retval] Windows.UI.Core.CoreWindow **windows);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.IdleDispatchedHandlerArgs),
@ -107,6 +443,141 @@ namespace Windows.UI.Core {
[propget] HRESULT IsDispatcherIdle([out, retval] boolean *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.InputEnabledEventArgs),
uuid(80371d4f-2fd8-4c24-aa86-3163a87b4e5a)
]
interface IInputEnabledEventArgs : IInspectable
requires Windows.UI.Core.ICoreWindowEventArgs
{
[propget] HRESULT InputEnabled([out, retval] boolean *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.KeyEventArgs),
uuid(5ff5e930-2544-4a17-bd78-1f2fdebb106b)
]
interface IKeyEventArgs : IInspectable
requires Windows.UI.Core.ICoreWindowEventArgs
{
[propget] HRESULT VirtualKey([out, retval] Windows.System.VirtualKey *value);
[propget] HRESULT KeyStatus([out, retval] Windows.UI.Core.CorePhysicalKeyStatus *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
exclusiveto(Windows.UI.Core.KeyEventArgs),
uuid(583add98-0790-4571-9b12-645ef9d79e42)
]
interface IKeyEventArgs2 : IInspectable
requires Windows.UI.Core.ICoreWindowEventArgs
{
[propget] HRESULT DeviceId([out, retval] HSTRING *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.PointerEventArgs),
uuid(920d9cb1-a5fc-4a21-8c09-49dfe6ffe25f)
]
interface IPointerEventArgs : IInspectable
requires Windows.UI.Core.ICoreWindowEventArgs
{
[propget] HRESULT CurrentPoint([out, retval] Windows.UI.Input.PointerPoint **value);
[propget] HRESULT KeyModifiers([out, retval] Windows.System.VirtualKeyModifiers *value);
HRESULT GetIntermediatePoints([out, retval] Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *> **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.TouchHitTestingEventArgs),
uuid(22f3b823-0b7c-424e-9df7-33d4f962931b)
]
interface ITouchHitTestingEventArgs : IInspectable
requires Windows.UI.Core.ICoreWindowEventArgs
{
[propget] HRESULT ProximityEvaluation([out, retval] Windows.UI.Core.CoreProximityEvaluation *value);
[propput] HRESULT ProximityEvaluation([in] Windows.UI.Core.CoreProximityEvaluation value);
[propget] HRESULT Point([out, retval] Windows.Foundation.Point *value);
[propget] HRESULT BoundingBox([out, retval] Windows.Foundation.Rect *value);
[default_overload] [overload("EvaluateProximity")] HRESULT EvaluateProximityToRect([in] Windows.Foundation.Rect bounding_box, [out, retval] Windows.UI.Core.CoreProximityEvaluation *evaluation);
[overload("EvaluateProximity")] HRESULT EvaluateProximityToPolygon([in] UINT32 vertice_size, [in] [size_is(vertice_size)] Windows.Foundation.Point *vertices, [out, retval] Windows.UI.Core.CoreProximityEvaluation *evaluation);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.VisibilityChangedEventArgs),
uuid(bf9918ea-d801-4564-a495-b1e84f8ad085)
]
interface IVisibilityChangedEventArgs : IInspectable
requires Windows.UI.Core.ICoreWindowEventArgs
{
[propget] HRESULT Visible([out, retval] boolean *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.WindowActivatedEventArgs),
uuid(179d65e7-4658-4cb6-aa13-41d094ea255e)
]
interface IWindowActivatedEventArgs : IInspectable
requires Windows.UI.Core.ICoreWindowEventArgs
{
[propget] HRESULT WindowActivationState([out, retval] Windows.UI.Core.CoreWindowActivationState *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Core.WindowSizeChangedEventArgs),
uuid(5a200ec7-0426-47dc-b86c-6f475915e451)
]
interface IWindowSizeChangedEventArgs : IInspectable
requires Windows.UI.Core.ICoreWindowEventArgs
{
[propget] HRESULT Size([out, retval] Windows.Foundation.Size *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass AutomationProviderRequestedEventArgs
{
[default] interface Windows.UI.Core.IAutomationProviderRequestedEventArgs;
interface Windows.UI.Core.ICoreWindowEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass CharacterReceivedEventArgs
{
[default] interface Windows.UI.Core.ICharacterReceivedEventArgs;
interface Windows.UI.Core.ICoreWindowEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 3.0),
marshaling_behavior(standard)
]
runtimeclass ClosestInteractiveBoundsRequestedEventArgs
{
[default] interface Windows.UI.Core.IClosestInteractiveBoundsRequestedEventArgs;
}
[
activatable(Windows.UI.Core.ICoreCursorFactory, Windows.Foundation.UniversalApiContract, 1.0),
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile)
]
runtimeclass CoreCursor
{
[default] interface Windows.UI.Core.ICoreCursor;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(agile)
@ -119,6 +590,31 @@ namespace Windows.UI.Core {
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.Core.ICoreDispatcher2;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard),
static(Windows.UI.Core.ICoreWindowStatic, Windows.Foundation.UniversalApiContract, 1.0)
]
runtimeclass CoreWindow
{
[default] interface Windows.UI.Core.ICoreWindow;
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.Core.ICoreWindow2;
[contract(Windows.Foundation.UniversalApiContract, 2.0)] interface Windows.UI.Core.ICorePointerRedirector;
[contract(Windows.Foundation.UniversalApiContract, 3.0)] interface Windows.UI.Core.ICoreWindow3;
[contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.UI.Core.ICoreWindow4;
[contract(Windows.Foundation.UniversalApiContract, 5.0)] interface Windows.UI.Core.ICoreWindow5;
[contract(Windows.Foundation.UniversalApiContract, 8.0)] interface Windows.UI.Core.ICoreWindowWithContext;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass CoreWindowEventArgs
{
[default] interface Windows.UI.Core.ICoreWindowEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
@ -127,4 +623,75 @@ namespace Windows.UI.Core {
{
[default] interface Windows.UI.Core.IIdleDispatchedHandlerArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass InputEnabledEventArgs
{
[default] interface Windows.UI.Core.IInputEnabledEventArgs;
interface Windows.UI.Core.ICoreWindowEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass KeyEventArgs
{
[default] interface Windows.UI.Core.IKeyEventArgs;
interface Windows.UI.Core.ICoreWindowEventArgs;
[contract(Windows.Foundation.UniversalApiContract, 3.0)] interface Windows.UI.Core.IKeyEventArgs2;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass PointerEventArgs
{
[default] interface Windows.UI.Core.IPointerEventArgs;
interface Windows.UI.Core.ICoreWindowEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass TouchHitTestingEventArgs
{
[default] interface Windows.UI.Core.ITouchHitTestingEventArgs;
interface Windows.UI.Core.ICoreWindowEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass VisibilityChangedEventArgs
{
[default] interface Windows.UI.Core.IVisibilityChangedEventArgs;
interface Windows.UI.Core.ICoreWindowEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass WindowActivatedEventArgs
{
[default] interface Windows.UI.Core.IWindowActivatedEventArgs;
interface Windows.UI.Core.ICoreWindowEventArgs;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(standard)
]
runtimeclass WindowSizeChangedEventArgs
{
[default] interface Windows.UI.Core.IWindowSizeChangedEventArgs;
interface Windows.UI.Core.ICoreWindowEventArgs;
}
}

View File

@ -0,0 +1,172 @@
/*
* Copyright (C) 2024 Zhiyi Zhang for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef __WIDL__
#pragma winrt ns_prefix
#endif
#ifndef DO_NO_IMPORTS
import "inspectable.idl";
import "asyncinfo.idl";
import "eventtoken.idl";
import "windowscontracts.idl";
import "windows.foundation.idl";
import "windows.devices.input.idl";
import "windows.system.idl";
import "windows.ui.core.idl";
#endif
namespace Windows.UI.Input {
typedef enum PointerUpdateKind PointerUpdateKind;
interface IPointerPoint;
interface IPointerPointProperties;
interface IPointerPointProperties2;
interface IPointerPointStatics;
interface IPointerPointTransform;
runtimeclass PointerPoint;
runtimeclass PointerPointProperties;
declare {
interface Windows.Foundation.Collections.IVectorView<Windows.UI.Input.PointerPoint *>;
interface Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *>;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0)
]
enum PointerUpdateKind
{
Other = 0,
LeftButtonPressed = 1,
LeftButtonReleased = 2,
RightButtonPressed = 3,
RightButtonReleased = 4,
MiddleButtonPressed = 5,
MiddleButtonReleased = 6,
XButton1Pressed = 7,
XButton1Released = 8,
XButton2Pressed = 9,
XButton2Released = 10
};
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Input.PointerPoint),
uuid(e995317d-7296-42d9-8233-c5be73b74a4a)
]
interface IPointerPoint : IInspectable
{
[propget] HRESULT PointerDevice([out, retval] Windows.Devices.Input.PointerDevice **value);
[propget] HRESULT Position([out, retval] Windows.Foundation.Point *value);
[propget] HRESULT RawPosition([out, retval] Windows.Foundation.Point *value);
[propget] HRESULT pointer_id([out, retval] UINT32 *value);
[propget] HRESULT FrameId([out, retval] UINT32 *value);
[propget] HRESULT Timestamp([out, retval] UINT64 *value);
[propget] HRESULT IsInContact([out, retval] boolean *value);
[propget] HRESULT Properties([out, retval] Windows.UI.Input.PointerPointProperties **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Input.PointerPointProperties),
uuid(c79d8a4b-c163-4ee7-803f-67ce79f9972d)
]
interface IPointerPointProperties : IInspectable
{
[propget] HRESULT Pressure([out, retval] FLOAT *value);
[propget] HRESULT IsInverted([out, retval] boolean *value);
[propget] HRESULT IsEraser([out, retval] boolean *value);
[propget] HRESULT Orientation([out, retval] FLOAT *value);
[propget] HRESULT XTilt([out, retval] FLOAT *value);
[propget] HRESULT YTilt([out, retval] FLOAT *value);
[propget] HRESULT Twist([out, retval] FLOAT *value);
[propget] HRESULT ContactRect([out, retval] Windows.Foundation.Rect *value);
[propget] HRESULT ContactRectRaw([out, retval] Windows.Foundation.Rect *value);
[propget] HRESULT TouchConfidence([out, retval] boolean *value);
[propget] HRESULT IsLeftButtonPressed([out, retval] boolean *value);
[propget] HRESULT IsRightButtonPressed([out, retval] boolean *value);
[propget] HRESULT IsMiddleButtonPressed([out, retval] boolean *value);
[propget] HRESULT MouseWheelDelta([out, retval] INT32 *value);
[propget] HRESULT IsHorizontalMouseWheel([out, retval] boolean *value);
[propget] HRESULT IsPrimary([out, retval] boolean *value);
[propget] HRESULT IsInRange([out, retval] boolean *value);
[propget] HRESULT IsCanceled([out, retval] boolean *value);
[propget] HRESULT IsBarrelButtonPressed([out, retval] boolean *value);
[propget] HRESULT IsXButton1Pressed([out, retval] boolean *value);
[propget] HRESULT IsXButton2Pressed([out, retval] boolean *value);
[propget] HRESULT PointerUpdateKind([out, retval] Windows.UI.Input.PointerUpdateKind *value);
HRESULT HasUsage([in] UINT32 usage_page, [in] UINT32 usage_id, [out, retval] boolean *value);
HRESULT GetUsageValue([in] UINT32 usage_page, [in] UINT32 usage_id, [out, retval] INT32 *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Input.PointerPointProperties),
uuid(22c3433a-c83b-41c0-a296-5e232d64d6af)
]
interface IPointerPointProperties2 : IInspectable
{
[propget] HRESULT ZDistance([out, retval] Windows.Foundation.IReference<FLOAT> **value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
exclusiveto(Windows.UI.Input.PointerPoint),
uuid(a506638d-2a1a-413e-bc75-9f38381cc069)
]
interface IPointerPointStatics : IInspectable
{
[overload("GetCurrentPoint")] HRESULT GetCurrentPoint([in] UINT32 pointer_id, [out, retval] Windows.UI.Input.PointerPoint **point);
[overload("GetIntermediatePoints")] HRESULT GetIntermediatePoints([in] UINT32 pointer_id, [out, retval] Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *> **points);
[overload("GetCurrentPoint")] HRESULT GetCurrentPointTransformed([in] UINT32 pointer_id, [in] Windows.UI.Input.IPointerPointTransform *transform, [out, retval] Windows.UI.Input.PointerPoint **point);
[overload("GetIntermediatePoints")] HRESULT GetIntermediatePointsTransformed([in] UINT32 pointer_id, [in] Windows.UI.Input.IPointerPointTransform *transform, [out, retval] Windows.Foundation.Collections.IVector<Windows.UI.Input.PointerPoint *> **points);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
uuid(4d5fe14f-b87c-4028-bc9c-59e9947fb056)
]
interface IPointerPointTransform : IInspectable
{
[propget] HRESULT Inverse([out, retval] Windows.UI.Input.IPointerPointTransform **value);
HRESULT TryTransform([in] Windows.Foundation.Point in_point, [out] Windows.Foundation.Point *out_point, [out, retval] boolean *value);
HRESULT TransformBounds([in] Windows.Foundation.Rect rect, [out, retval] Windows.Foundation.Rect *value);
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(none),
static(Windows.UI.Input.IPointerPointStatics, Windows.Foundation.UniversalApiContract, 1.0)
]
runtimeclass PointerPoint
{
[default] interface Windows.UI.Input.IPointerPoint;
}
[
contract(Windows.Foundation.UniversalApiContract, 1.0),
marshaling_behavior(none)
]
runtimeclass PointerPointProperties
{
[default] interface Windows.UI.Input.IPointerPointProperties;
[contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.Input.IPointerPointProperties2;
}
}

View File

@ -4564,7 +4564,7 @@ NTSYSAPI NTSTATUS WINAPI NtQueryLicenseValue(const UNICODE_STRING *,ULONG *,PVO
NTSYSAPI NTSTATUS WINAPI NtQueryVirtualMemory(HANDLE,LPCVOID,MEMORY_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
NTSYSAPI NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
NTSYSAPI NTSTATUS WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
NTSYSAPI NTSTATUS WINAPI NtRaiseHardError(NTSTATUS,ULONG,PUNICODE_STRING,PVOID*,HARDERROR_RESPONSE_OPTION,PHARDERROR_RESPONSE);
NTSYSAPI NTSTATUS WINAPI NtRaiseHardError(NTSTATUS,ULONG,ULONG,PVOID*,HARDERROR_RESPONSE_OPTION,PHARDERROR_RESPONSE);
NTSYSAPI NTSTATUS WINAPI NtReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG);
NTSYSAPI NTSTATUS WINAPI NtReadFileScatter(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,FILE_SEGMENT_ELEMENT*,ULONG,PLARGE_INTEGER,PULONG);
NTSYSAPI NTSTATUS WINAPI NtReadRequestData(HANDLE,PLPC_MESSAGE,ULONG,PVOID,ULONG,PULONG);

View File

@ -16,7 +16,7 @@ UNIX_CFLAGS = -fPIE
preloader_EXTRADEFS = -fno-builtin
main_EXTRADEFS = -DDLLDIR=\"${dlldir}\" -DBIN_TO_DLLDIR=\"`${MAKEDEP} -R ${bindir} ${dlldir}`\"
main_EXTRADEFS = -DDLLDIR=\"${libdir}/wine\" -DBIN_TO_DLLDIR=\"`${MAKEDEP} -R ${bindir} ${libdir}/wine`\"
wine_OBJS = main.o
wine_DEPS = $(WINELOADER_DEPENDS)

View File

@ -42,7 +42,7 @@ one = %1
3
4
5
@todo_wine@var contents: 11
var contents: 11
var=33@space@
99
------ Testing invocation of batch files ----------

View File

@ -322,8 +322,8 @@ void WCMD_print_error (void) {
*
*/
static void WCMD_show_prompt (BOOL newLine) {
static void WCMD_show_prompt(void)
{
int status;
WCHAR out_string[MAX_PATH], curdir[MAX_PATH], prompt_string[MAX_PATH];
WCHAR *p, *q;
@ -335,10 +335,6 @@ static void WCMD_show_prompt (BOOL newLine) {
}
p = prompt_string;
q = out_string;
if (newLine) {
*q++ = '\r';
*q++ = '\n';
}
*q = '\0';
while (*p != '\0') {
if (*p != '$') {
@ -788,7 +784,7 @@ static WCHAR *WCMD_expand_envvar(WCHAR *start, WCHAR startchar)
* rather than at parse time, i.e. delayed expansion and for loops need to be
* processed
*/
static void handleExpansion(WCHAR *cmd, BOOL atExecute, BOOL delayed) {
static void handleExpansion(WCHAR *cmd, BOOL atExecute) {
/* For commands in a context (batch program): */
/* Expand environment variables in a batch file %{0-9} first */
@ -802,6 +798,7 @@ static void handleExpansion(WCHAR *cmd, BOOL atExecute, BOOL delayed) {
WCHAR *p = cmd;
WCHAR *t;
int i;
BOOL delayed = atExecute ? delayedsubst : FALSE;
WCHAR *delayedp = NULL;
WCHAR startchar = '%';
WCHAR *normalp;
@ -815,15 +812,16 @@ static void handleExpansion(WCHAR *cmd, BOOL atExecute, BOOL delayed) {
}
}
/* Find the next environment variable delimiter */
normalp = wcschr(p, '%');
if (delayed) delayedp = wcschr(p, '!');
if (!normalp) p = delayedp;
else if (!delayedp) p = normalp;
else p = min(p,delayedp);
if (p) startchar = *p;
while (p) {
for (;;)
{
/* Find the next environment variable delimiter */
normalp = wcschr(p, '%');
if (delayed) delayedp = wcschr(p, '!');
if (!normalp) p = delayedp;
else if (!delayedp) p = normalp;
else p = min(p,delayedp);
if (!p) break;
startchar = *p;
WINE_TRACE("Translate command:%s %d (at: %s)\n",
wine_dbgstr_w(cmd), atExecute, wine_dbgstr_w(p));
@ -871,17 +869,7 @@ static void handleExpansion(WCHAR *cmd, BOOL atExecute, BOOL delayed) {
p++;
}
}
/* Find the next environment variable delimiter */
normalp = wcschr(p, '%');
if (delayed) delayedp = wcschr(p, '!');
if (!normalp) p = delayedp;
else if (!delayedp) p = normalp;
else p = min(p,delayedp);
if (p) startchar = *p;
}
return;
}
@ -1637,7 +1625,7 @@ static BOOL set_std_redirections(CMD_REDIRECTION *redir, WCHAR *in_pipe)
case REDIR_READ_FROM:
if (in_pipe) continue; /* give precedence to pipe */
wcscpy(expanded_filename, redir->file);
handleExpansion(expanded_filename, context != NULL, delayedsubst);
handleExpansion(expanded_filename, TRUE);
h = CreateFileW(expanded_filename, GENERIC_READ, FILE_SHARE_READ,
&sa, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (h == INVALID_HANDLE_VALUE)
@ -1652,7 +1640,7 @@ static BOOL set_std_redirections(CMD_REDIRECTION *redir, WCHAR *in_pipe)
{
DWORD disposition = redir->kind == REDIR_WRITE_TO ? CREATE_ALWAYS : OPEN_ALWAYS;
wcscpy(expanded_filename, redir->file);
handleExpansion(expanded_filename, context != NULL, delayedsubst);
handleExpansion(expanded_filename, TRUE);
h = CreateFileW(expanded_filename, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_DELETE,
&sa, disposition, FILE_ATTRIBUTE_NORMAL, NULL);
if (h == INVALID_HANDLE_VALUE)
@ -1720,7 +1708,7 @@ static void execute_single_command(const WCHAR *command, CMD_NODE **cmdList, BOO
}
parms_start = WCMD_skip_leading_spaces (&whichcmd[count]);
handleExpansion(new_cmd, (context != NULL), delayedsubst);
handleExpansion(new_cmd, TRUE);
/*
* Changing default drive has to be handled as a special case, anything
@ -2042,87 +2030,6 @@ static WCHAR *find_chr(WCHAR *in, WCHAR *last, const WCHAR *delims)
return NULL;
}
/***************************************************************************
* WCMD_addCommand
*
* Adds a command to the current command list
*/
static CMD_COMMAND *WCMD_createCommand(WCHAR *command, int *commandLen,
WCHAR *redirs, int *redirLen,
WCHAR **copyTo, int **copyToLen,
int curDepth)
{
CMD_COMMAND *thisEntry = NULL;
/* Allocate storage for command */
thisEntry = xalloc(sizeof(CMD_COMMAND));
/* Copy in the command */
if (command) {
WCHAR *pos;
WCHAR *last = redirs + *redirLen;
CMD_REDIRECTION **insrt;
thisEntry->command = xalloc((*commandLen + 1) * sizeof(WCHAR));
memcpy(thisEntry->command, command, *commandLen * sizeof(WCHAR));
thisEntry->command[*commandLen] = 0x00;
if (redirs) redirs[*redirLen] = 0;
/* Create redirects, keeping order (eg "2>foo 1>&2") */
insrt = &thisEntry->redirects;
*insrt = NULL;
for (pos = redirs; pos; insrt = &(*insrt)->next)
{
WCHAR *p = find_chr(pos, last, L"<>");
WCHAR *filename;
if (!p) break;
if (*p == L'<')
{
filename = WCMD_parameter(p + 1, 0, NULL, FALSE, FALSE);
handleExpansion(filename, context != NULL, FALSE);
*insrt = redirection_create_file(REDIR_READ_FROM, 0, filename);
}
else
{
unsigned fd = 1;
unsigned op = REDIR_WRITE_TO;
if (p > redirs && p[-1] >= L'2' && p[-1] <= L'9') fd = p[-1] - L'0';
if (*++p == L'>') {p++; op = REDIR_WRITE_APPEND;}
if (*p == L'&' && (p[1] >= L'0' && p[1] <= L'9'))
{
*insrt = redirection_create_clone(fd, p[1] - '0');
p++;
}
else
{
filename = WCMD_parameter(p, 0, NULL, FALSE, FALSE);
handleExpansion(filename, context != NULL, FALSE);
*insrt = redirection_create_file(op, fd, filename);
}
}
pos = p + 1;
}
/* Reset the lengths */
*commandLen = 0;
*redirLen = 0;
*copyToLen = commandLen;
*copyTo = command;
} else {
thisEntry->command = NULL;
thisEntry->redirects = NULL;
}
/* Fill in other fields */
thisEntry->pipeFile[0] = 0x00;
thisEntry->bracketDepth = curDepth;
return thisEntry;
}
/***************************************************************************
* WCMD_IsEndQuote
*
@ -2378,6 +2285,7 @@ struct node_builder
union token_parameter parameter;
} *stack;
unsigned pos;
unsigned opened_parenthesis;
};
static const char* debugstr_token(enum builder_token tkn, union token_parameter tkn_pmt)
@ -2542,6 +2450,152 @@ static BOOL node_builder_generate(struct node_builder *builder, CMD_NODE **node)
return FALSE;
}
/***************************************************************************
* WCMD_addCommand
*
* Adds a command to the current command list
*/
static void lexer_push_command(struct node_builder *builder,
WCHAR *command, int *commandLen,
WCHAR *redirs, int *redirLen,
WCHAR **copyTo, int **copyToLen)
{
union token_parameter tkn_pmt;
CMD_COMMAND *thisEntry = NULL;
/* Allocate storage for command */
thisEntry = xalloc(sizeof(CMD_COMMAND));
/* Copy in the command */
if (command)
{
WCHAR *pos;
WCHAR *last = redirs + *redirLen;
CMD_REDIRECTION **insrt;
thisEntry->command = xalloc((*commandLen + 1) * sizeof(WCHAR));
memcpy(thisEntry->command, command, *commandLen * sizeof(WCHAR));
thisEntry->command[*commandLen] = 0x00;
if (redirs) redirs[*redirLen] = 0;
/* Create redirects, keeping order (eg "2>foo 1>&2") */
insrt = &thisEntry->redirects;
*insrt = NULL;
for (pos = redirs; pos; insrt = &(*insrt)->next)
{
WCHAR *p = find_chr(pos, last, L"<>");
WCHAR *filename;
if (!p) break;
if (*p == L'<')
{
filename = WCMD_parameter(p + 1, 0, NULL, FALSE, FALSE);
*insrt = redirection_create_file(REDIR_READ_FROM, 0, filename);
}
else
{
unsigned fd = 1;
unsigned op = REDIR_WRITE_TO;
if (p > redirs && p[-1] >= L'2' && p[-1] <= L'9') fd = p[-1] - L'0';
if (*++p == L'>') {p++; op = REDIR_WRITE_APPEND;}
if (*p == L'&' && (p[1] >= L'0' && p[1] <= L'9'))
{
*insrt = redirection_create_clone(fd, p[1] - '0');
p++;
}
else
{
filename = WCMD_parameter(p, 0, NULL, FALSE, FALSE);
*insrt = redirection_create_file(op, fd, filename);
}
}
pos = p + 1;
}
/* Reset the lengths */
*commandLen = 0;
*redirLen = 0;
*copyToLen = commandLen;
*copyTo = command;
}
else
{
thisEntry->command = NULL;
thisEntry->redirects = NULL;
}
/* Fill in other fields */
thisEntry->pipeFile[0] = 0x00;
thisEntry->bracketDepth = builder->opened_parenthesis;
tkn_pmt.command = thisEntry;
node_builder_push_token_parameter(builder, TKN_COMMAND, tkn_pmt);
}
static WCHAR *fetch_next_line(BOOL feed, BOOL first_line, HANDLE from, WCHAR* buffer)
{
/* display prompt */
if (interactive && !context)
{
/* native does is this way... not symmetrical wrt. echo_mode */
if (!first_line)
WCMD_output_asis(WCMD_LoadMessage(WCMD_MOREPROMPT));
else if (echo_mode)
WCMD_show_prompt();
}
if (feed && !WCMD_fgets(buffer, MAXSTRING, from))
{
buffer[0] = L'\0';
return NULL;
}
/* Handle truncated input - issue warning */
if (wcslen(buffer) == MAXSTRING - 1)
{
WCMD_output_asis_stderr(WCMD_LoadMessage(WCMD_TRUNCATEDLINE));
WCMD_output_asis_stderr(buffer);
WCMD_output_asis_stderr(L"\r\n");
}
/* Replace env vars if in a batch context */
handleExpansion(buffer, FALSE);
buffer = WCMD_skip_leading_spaces(buffer);
/* Show prompt before batch line IF echo is on and in batch program */
if (context && echo_mode && *buffer && *buffer != '@')
{
if (first_line)
{
const size_t len = wcslen(L"echo.");
size_t curr_size = wcslen(buffer);
size_t min_len = curr_size < len ? curr_size : len;
WCMD_output_asis(L"\r\n");
WCMD_show_prompt();
WCMD_output_asis(buffer);
/* I don't know why Windows puts a space here but it does */
/* Except for lines starting with 'echo.', 'echo:' or 'echo/'. Ask MS why */
if (CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
buffer, min_len, L"echo.", len) != CSTR_EQUAL
&& CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
buffer, min_len, L"echo:", len) != CSTR_EQUAL
&& CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
buffer, min_len, L"echo/", len) != CSTR_EQUAL)
{
WCMD_output_asis(L" ");
}
}
else
WCMD_output_asis(buffer);
WCMD_output_asis(L"\r\n");
}
/* Skip repeated 'no echo' characters and whitespace */
while (*buffer == '@' || *buffer == L' ' || *buffer == L'\t') buffer++;
return buffer;
}
/***************************************************************************
* WCMD_ReadAndParseLine
*
@ -2566,8 +2620,6 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
int curRedirsLen = 0;
WCHAR *curCopyTo;
int *curLen;
int curDepth = 0;
union token_parameter tkn_pmt;
enum builder_token cmd_tkn = TKN_AMP;
static WCHAR *extraSpace = NULL; /* Deliberately never freed */
BOOL inOneLine = FALSE;
@ -2581,7 +2633,6 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
BOOL lastWasIn = FALSE;
BOOL lastWasElse = FALSE;
BOOL lastWasRedirect = TRUE;
BOOL lastWasCaret = FALSE;
BOOL ignoreBracket = FALSE; /* Some expressions after if (set) require */
/* handling brackets as a normal character */
int lineCurDepth; /* Bracket depth when line was read in */
@ -2593,71 +2644,24 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
/* Allocate working space for a command read from keyboard, file etc */
if (!extraSpace)
extraSpace = xalloc((MAXSTRING + 1) * sizeof(WCHAR));
if (!extraSpace)
{
WINE_ERR("Could not allocate memory for extraSpace\n");
return NULL;
}
*output = NULL;
/* If initial command read in, use that, otherwise get input from handle */
if (optionalcmd != NULL) {
lstrcpyW(extraSpace, optionalcmd);
} else if (readFrom == INVALID_HANDLE_VALUE) {
WINE_FIXME("No command nor handle supplied\n");
} else {
if (!WCMD_fgets(extraSpace, MAXSTRING, readFrom))
return NULL;
}
curPos = extraSpace;
if (optionalcmd)
wcscpy(extraSpace, optionalcmd);
if (!(curPos = fetch_next_line(optionalcmd == NULL, TRUE, readFrom, extraSpace)))
return NULL;
TRACE("About to parse line (%ls)\n", extraSpace);
node_builder_init(&builder);
/* Handle truncated input - issue warning */
if (lstrlenW(extraSpace) == MAXSTRING -1) {
WCMD_output_asis_stderr(WCMD_LoadMessage(WCMD_TRUNCATEDLINE));
WCMD_output_asis_stderr(extraSpace);
WCMD_output_asis_stderr(L"\r\n");
}
/* Replace env vars if in a batch context */
if (context) handleExpansion(extraSpace, FALSE, FALSE);
/* Skip preceding whitespace */
while (*curPos == ' ' || *curPos == '\t') curPos++;
/* Show prompt before batch line IF echo is on and in batch program */
if (context && echo_mode && *curPos && (*curPos != '@')) {
const DWORD len = lstrlenW(L"echo.");
DWORD curr_size = lstrlenW(curPos);
DWORD min_len = (curr_size < len ? curr_size : len);
WCMD_show_prompt(TRUE);
WCMD_output_asis(curPos);
/* I don't know why Windows puts a space here but it does */
/* Except for lines starting with 'echo.', 'echo:' or 'echo/'. Ask MS why */
if (CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
curPos, min_len, L"echo.", len) != CSTR_EQUAL
&& CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
curPos, min_len, L"echo:", len) != CSTR_EQUAL
&& CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
curPos, min_len, L"echo/", len) != CSTR_EQUAL)
{
WCMD_output_asis(L" ");
}
WCMD_output_asis(L"\r\n");
}
/* Skip repeated 'no echo' characters */
while (*curPos == '@') curPos++;
/* Start with an empty string, copying to the command string */
curStringLen = 0;
curRedirsLen = 0;
curCopyTo = curString;
curLen = &curStringLen;
lastWasRedirect = FALSE; /* Required e.g. for spaces between > and filename */
lineCurDepth = curDepth; /* What was the curdepth at the beginning of the line */
lineCurDepth = builder.opened_parenthesis; /* What was the curdepth at the beginning of the line */
/* Parse every character on the line being processed */
while (*curPos != 0x00) {
@ -2723,7 +2727,7 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
if (resetAtEndOfLine) {
WINE_TRACE("Resetting curdepth at end of line to %d\n", lineCurDepth);
resetAtEndOfLine = FALSE;
curDepth = lineCurDepth;
builder.opened_parenthesis = lineCurDepth;
}
continue;
@ -2767,7 +2771,6 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
else thisChar = 'X'; /* Character with no special processing */
lastWasWhiteSpace = FALSE; /* Will be reset below */
lastWasCaret = FALSE;
switch (thisChar) {
@ -2833,11 +2836,9 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
node_builder_push_token(&builder, cmd_tkn);
/* Add the current command */
tkn_pmt.command = WCMD_createCommand(curString, &curStringLen,
curRedirs, &curRedirsLen,
&curCopyTo, &curLen,
curDepth);
node_builder_push_token_parameter(&builder, TKN_COMMAND, tkn_pmt);
lexer_push_command(&builder, curString, &curStringLen,
curRedirs, &curRedirsLen,
&curCopyTo, &curLen);
}
if (*(curPos+1) == '|') {
@ -2850,8 +2851,8 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
/* If in an IF or ELSE statement, put subsequent chained
commands at a higher depth as if brackets were supplied
but remember to reset to the original depth at EOL */
if ((inIf || inElse) && curDepth == lineCurDepth) {
curDepth++;
if ((inIf || inElse) && builder.opened_parenthesis == lineCurDepth) {
builder.opened_parenthesis++;
resetAtEndOfLine = TRUE;
}
} else {
@ -2882,7 +2883,7 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
/* Ignore open brackets inside the for set */
if (*curLen == 0 && !inIn) {
curDepth++;
builder.opened_parenthesis++;
/* If in quotes, ignore brackets */
} else if (inQuotes) {
@ -2907,13 +2908,10 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
node_builder_push_token(&builder, cmd_tkn);
/* Add the current command */
tkn_pmt.command = WCMD_createCommand(curString, &curStringLen,
curRedirs, &curRedirsLen,
&curCopyTo, &curLen,
curDepth);
node_builder_push_token_parameter(&builder, TKN_COMMAND, tkn_pmt);
curDepth++;
lexer_push_command(&builder, curString, &curStringLen,
curRedirs, &curRedirsLen,
&curCopyTo, &curLen);
builder.opened_parenthesis++;
} else {
curCopyTo[(*curLen)++] = *curPos;
}
@ -2921,9 +2919,18 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
case '^': if (!inQuotes) {
/* If we reach the end of the input, we need to wait for more */
if (*(curPos+1) == 0x00) {
lastWasCaret = TRUE;
WINE_TRACE("Caret found at end of line\n");
if (curPos[1] == L'\0') {
TRACE("Caret found at end of line\n");
extraSpace[0] = L'^';
if (!fetch_next_line(TRUE, FALSE, readFrom, extraSpace + 1))
break;
if (!extraSpace[1]) /* empty line */
{
extraSpace[1] = L'\r';
if (!fetch_next_line(TRUE, FALSE, readFrom, extraSpace + 2))
break;
}
curPos = extraSpace;
break;
}
curPos++;
@ -2939,11 +2946,9 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
node_builder_push_token(&builder, cmd_tkn);
/* Add the current command */
tkn_pmt.command = WCMD_createCommand(curString, &curStringLen,
curRedirs, &curRedirsLen,
&curCopyTo, &curLen,
curDepth);
node_builder_push_token_parameter(&builder, TKN_COMMAND, tkn_pmt);
lexer_push_command(&builder, curString, &curStringLen,
curRedirs, &curRedirsLen,
&curCopyTo, &curLen);
}
if (*(curPos+1) == '&') {
@ -2955,8 +2960,8 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
/* If in an IF or ELSE statement, put subsequent chained
commands at a higher depth as if brackets were supplied
but remember to reset to the original depth at EOL */
if ((inIf || inElse) && curDepth == lineCurDepth) {
curDepth++;
if ((inIf || inElse) && builder.opened_parenthesis == lineCurDepth) {
builder.opened_parenthesis++;
resetAtEndOfLine = TRUE;
}
} else {
@ -2964,7 +2969,7 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
}
break;
case ')': if (!inQuotes && curDepth > 0) {
case ')': if (!inQuotes && builder.opened_parenthesis > 0) {
lastWasRedirect = FALSE;
/* Add the current command if there is one */
@ -2972,23 +2977,19 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
node_builder_push_token(&builder, cmd_tkn);
/* Add the current command */
tkn_pmt.command = WCMD_createCommand(curString, &curStringLen,
lexer_push_command(&builder, curString, &curStringLen,
curRedirs, &curRedirsLen,
&curCopyTo, &curLen,
curDepth);
node_builder_push_token_parameter(&builder, TKN_COMMAND, tkn_pmt);
&curCopyTo, &curLen);
}
/* Add an empty entry to the command list */
cmd_tkn = TKN_AMP;
node_builder_push_token(&builder, cmd_tkn);
tkn_pmt.command = WCMD_createCommand(NULL, &curStringLen,
curRedirs, &curRedirsLen,
&curCopyTo, &curLen,
curDepth);
node_builder_push_token_parameter(&builder, TKN_COMMAND, tkn_pmt);
lexer_push_command(&builder, NULL, &curStringLen,
curRedirs, &curRedirsLen,
&curCopyTo, &curLen);
curDepth--;
builder.opened_parenthesis--;
/* Leave inIn if necessary */
if (inIn) inIn = FALSE;
@ -3016,80 +3017,46 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_NODE **output, HANDLE
/* If we have reached the end, add this command into the list
Do not add command to list if escape char ^ was last */
if (*curPos == 0x00 && !lastWasCaret && *curLen > 0) {
if (*curPos == 0x00 && *curLen > 0) {
node_builder_push_token(&builder, cmd_tkn);
/* Add an entry to the command list */
tkn_pmt.command = WCMD_createCommand(curString, &curStringLen,
curRedirs, &curRedirsLen,
&curCopyTo, &curLen,
curDepth);
node_builder_push_token_parameter(&builder, TKN_COMMAND, tkn_pmt);
lexer_push_command(&builder, curString, &curStringLen,
curRedirs, &curRedirsLen,
&curCopyTo, &curLen);
/* If we had a single line if or else, and we pretended to add
brackets, end them now */
if (resetAtEndOfLine) {
WINE_TRACE("Resetting curdepth at end of line to %d\n", lineCurDepth);
resetAtEndOfLine = FALSE;
curDepth = lineCurDepth;
builder.opened_parenthesis = lineCurDepth;
}
}
/* If we have reached the end of the string, see if bracketing or
final caret is outstanding */
if (*curPos == 0x00 && (curDepth > 0 || lastWasCaret) &&
readFrom != INVALID_HANDLE_VALUE) {
WCHAR *extraData;
if (*curPos == 0x00 && builder.opened_parenthesis > 0 && readFrom != INVALID_HANDLE_VALUE) {
WINE_TRACE("Need to read more data as outstanding brackets or carets\n");
inOneLine = FALSE;
ignoreBracket = FALSE;
cmd_tkn = TKN_AMP;
inQuotes = 0;
memset(extraSpace, 0x00, (MAXSTRING+1) * sizeof(WCHAR));
extraData = extraSpace;
/* Read more, skipping any blank lines */
do {
WINE_TRACE("Read more input\n");
if (!context) WCMD_output_asis( WCMD_LoadMessage(WCMD_MOREPROMPT));
if (!WCMD_fgets(extraData, MAXSTRING, readFrom))
break;
/* Edge case for carets - a completely blank line (i.e. was just
CRLF) is oddly added as an LF but then more data is received (but
only once more!) */
if (lastWasCaret) {
if (*extraSpace == 0x00) {
WINE_TRACE("Read nothing, so appending LF char and will try again\n");
*extraData++ = '\r';
*extraData = 0x00;
} else break;
}
extraData = WCMD_skip_leading_spaces(extraData);
} while (*extraData == 0x00);
curPos = extraSpace;
/* Skip preceding whitespace */
while (*curPos == ' ' || *curPos == '\t') curPos++;
/* Replace env vars if in a batch context */
if (context) handleExpansion(curPos, FALSE, FALSE);
/* Continue to echo commands IF echo is on and in batch program */
if (context && echo_mode && *curPos && *curPos != '@') {
WCMD_output_asis(extraSpace);
WCMD_output_asis(L"\r\n");
}
/* Skip repeated 'no echo' characters and whitespace */
while (*curPos == '@' || *curPos == ' ' || *curPos == '\t') curPos++;
if (!(curPos = fetch_next_line(TRUE, FALSE, readFrom, extraSpace)))
break;
} while (*curPos == L'\0');
if (!curPos)
curPos = extraSpace;
}
}
*output = NULL;
ret = curDepth <= lineCurDepth && node_builder_generate(&builder, output);
ret = builder.opened_parenthesis <= lineCurDepth && node_builder_generate(&builder, output);
node_builder_dispose(&builder);
if (!ret)
{
@ -3116,7 +3083,7 @@ BOOL if_condition_evaluate(CMD_IF_CONDITION *cond, int *test)
int level;
wcscpy(expanded_left, cond->operand);
handleExpansion(expanded_left, context != NULL, delayedsubst);
handleExpansion(expanded_left, TRUE);
level = wcstol(expanded_left, &endptr, 10);
if (*endptr) return FALSE;
*test = errorlevel >= level;
@ -3129,7 +3096,7 @@ BOOL if_condition_evaluate(CMD_IF_CONDITION *cond, int *test)
HANDLE hff;
wcscpy(expanded_left, cond->operand);
handleExpansion(expanded_left, context != NULL, delayedsubst);
handleExpansion(expanded_left, TRUE);
if ((len = wcslen(expanded_left)))
{
/* FindFirstFile does not like a directory path ending in '\' or '/', so append a '.' */
@ -3145,14 +3112,14 @@ BOOL if_condition_evaluate(CMD_IF_CONDITION *cond, int *test)
break;
case CMD_IF_DEFINED:
wcscpy(expanded_left, cond->operand);
handleExpansion(expanded_left, context != NULL, delayedsubst);
handleExpansion(expanded_left, TRUE);
*test = GetEnvironmentVariableW(expanded_left, NULL, 0) > 0;
break;
case CMD_IF_BINOP_EQUAL:
wcscpy(expanded_left, cond->left);
handleExpansion(expanded_left, context != NULL, delayedsubst);
handleExpansion(expanded_left, TRUE);
wcscpy(expanded_right, cond->right);
handleExpansion(expanded_right, context != NULL, delayedsubst);
handleExpansion(expanded_right, TRUE);
/* == is a special case, as it always compares strings */
*test = (*cmp)(expanded_left, expanded_right) == 0;
@ -3164,9 +3131,9 @@ BOOL if_condition_evaluate(CMD_IF_CONDITION *cond, int *test)
int cmp_val;
wcscpy(expanded_left, cond->left);
handleExpansion(expanded_left, context != NULL, delayedsubst);
handleExpansion(expanded_left, TRUE);
wcscpy(expanded_right, cond->right);
handleExpansion(expanded_right, context != NULL, delayedsubst);
handleExpansion(expanded_right, TRUE);
/* Check if we have plain integers (in decimal, octal or hexadecimal notation) */
left_int = wcstol(expanded_left, &end_left, 0);
@ -3380,7 +3347,7 @@ static CMD_NODE *for_control_execute_fileset(CMD_FOR_CONTROL *for_ctrl, CMD_NODE
int i;
wcscpy(set, for_ctrl->set);
handleExpansion(set, context != NULL, delayedsubst);
handleExpansion(set, TRUE);
args = WCMD_skip_leading_spaces(set);
for (len = wcslen(args); len && (args[len - 1] == L' ' || args[len - 1] == L'\t'); len--)
@ -3456,7 +3423,7 @@ static CMD_NODE *for_control_execute_set(CMD_FOR_CONTROL *for_ctrl, const WCHAR
len = 0;
wcscpy(set, for_ctrl->set);
handleExpansion(set, context != NULL, delayedsubst);
handleExpansion(set, TRUE);
for (i = 0; ; i++)
{
WCHAR *element = WCMD_parameter(set, i, NULL, TRUE, FALSE);
@ -3519,7 +3486,7 @@ static CMD_NODE *for_control_execute_walk_files(CMD_FOR_CONTROL *for_ctrl, CMD_N
WCHAR buffer[MAXSTRING];
wcscpy(buffer, for_ctrl->root_dir);
handleExpansion(buffer, context != NULL, delayedsubst);
handleExpansion(buffer, TRUE);
dirs_to_walk = WCMD_dir_stack_create(buffer, NULL);
}
else dirs_to_walk = WCMD_dir_stack_create(NULL, NULL);
@ -3548,7 +3515,7 @@ static CMD_NODE *for_control_execute_numbers(CMD_FOR_CONTROL *for_ctrl, CMD_NODE
int i;
wcscpy(set, for_ctrl->set);
handleExpansion(set, context != NULL, delayedsubst);
handleExpansion(set, TRUE);
/* Note: native doesn't check the actual number of parameters, and set
* them by default to 0.
@ -3663,7 +3630,6 @@ int __cdecl wmain (int argc, WCHAR *argvW[])
WCHAR *cmd = NULL;
WCHAR string[1024];
WCHAR envvar[4];
BOOL promptNewLine = TRUE;
BOOL opt_q;
int opt_t = 0;
WCHAR comspec[MAX_PATH];
@ -4017,16 +3983,16 @@ int __cdecl wmain (int argc, WCHAR *argvW[])
interactive = TRUE;
if (!opt_k) WCMD_version ();
if (echo_mode) WCMD_output_asis(L"\r\n");
while (TRUE) {
/* Read until EOF (which for std input is never, but if redirect
in place, may occur */
if (echo_mode) WCMD_show_prompt(promptNewLine);
if (!WCMD_ReadAndParseLine(NULL, &toExecute, GetStdHandle(STD_INPUT_HANDLE)))
break;
WCMD_process_commands(toExecute, FALSE, FALSE);
node_dispose_tree(toExecute);
promptNewLine = !!toExecute;
if (toExecute && echo_mode) WCMD_output_asis(L"\r\n");
toExecute = NULL;
}
return 0;

View File

@ -49,4 +49,4 @@ SOURCES = \
UNIX_LIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS) $(PROCSTAT_LIBS)
unicode_EXTRADEFS = -DNLSDIR="\"${nlsdir}\"" -DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\"
unicode_EXTRADEFS = -DNLSDIR="\"${datadir}/wine/nls\"" -DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${datadir}/wine/nls`\"

View File

@ -1,6 +1,11 @@
PROGRAMS = \
makedep \
make_xftmpl
SOURCES = \
makedep.c \
make_xftmpl.c \
wineapploader.in
makedep_OBJS = makedep.o
make_xftmpl_OBJS = make_xftmpl.o

View File

@ -539,6 +539,31 @@ static char *get_relative_path( const char *from, const char *dest )
}
/*******************************************************************
* get_root_relative_path
*
* Get relative path from obj dir to root.
*/
static const char *get_root_relative_path( struct makefile *make )
{
const char *dir = make->obj_dir;
char *ret, *p;
unsigned int dotdots = 0;
if (!dir) return ".";
while (*dir)
{
dotdots++;
while (*dir && *dir != '/') dir++;
while (*dir == '/') dir++;
}
ret = xmalloc( 3 * dotdots );
for (p = ret; dotdots; dotdots--, p += 3) memcpy( p, "../", 3 );
p[-1] = 0; /* remove trailing slash */
return ret;
}
/*******************************************************************
* concat_paths
*/
@ -2491,7 +2516,7 @@ static void output_srcdir_symlink( struct makefile *make, const char *obj )
src_name = src_file;
if (src_name[0] != '/' && make->obj_dir)
src_name = concat_paths( get_relative_path( make->obj_dir, "" ), src_name );
src_name = concat_paths( get_root_relative_path( make ), src_name );
output_symlink_rule( src_name, dst_file, 0 );
strarray_add( &make->all_targets[0], obj );
@ -2639,7 +2664,7 @@ static struct strarray get_removable_dirs( struct strarray files )
static void output_uninstall_rules( struct makefile *make )
{
static const char *dirs_order[] =
{ "$(includedir)", "$(mandir)", "$(fontdir)", "$(nlsdir)", "$(datadir)", "$(dlldir)" };
{ "$(includedir)", "$(mandir)", "$(datadir)" };
struct strarray uninstall_dirs;
unsigned int i, j;
@ -2962,7 +2987,7 @@ static void output_source_sfd( struct makefile *make, struct incl_file *source,
}
if (source->file->flags & FLAG_INSTALL)
{
add_install_rule( make, source->name, 0, ttf_obj, strmake( "D$(fontdir)/%s", ttf_obj ));
add_install_rule( make, source->name, 0, ttf_obj, strmake( "D$(datadir)/wine/fonts/%s", ttf_obj ));
output_srcdir_symlink( make, ttf_obj );
}
@ -2980,7 +3005,7 @@ static void output_source_sfd( struct makefile *make, struct incl_file *source,
tools_path( make, "sfnt2fon" ), ttf_file );
output( "\t%s%s -q -o $@ %s %s\n", cmd_prefix( "GEN" ),
tools_path( make, "sfnt2fon" ), ttf_file, args );
add_install_rule( make, source->name, 0, xstrdup(font), strmake( "d$(fontdir)/%s", font ));
add_install_rule( make, source->name, 0, xstrdup(font), strmake( "d$(datadir)/wine/fonts/%s", font ));
}
}
}
@ -3017,7 +3042,7 @@ static void output_source_svg( struct makefile *make, struct incl_file *source,
static void output_source_nls( struct makefile *make, struct incl_file *source, const char *obj )
{
add_install_rule( make, source->name, 0, source->name,
strmake( "D$(nlsdir)/%s", source->name ));
strmake( "D$(datadir)/wine/nls/%s", source->name ));
output_srcdir_symlink( make, strmake( "%s.nls", obj ));
}
@ -3358,7 +3383,7 @@ static void output_fake_module( struct makefile *make, const char *spec_file )
if (make->disabled[arch]) return;
strarray_add( &make->all_targets[arch], name );
add_install_rule( make, make->module, arch, name, strmake( "d$(dlldir)/%s", name ));
add_install_rule( make, make->module, arch, name, strmake( "d$(libdir)/wine/%s", name ));
output( "%s:", obj_dir_path( make, name ));
if (spec_file) output_filename( spec_file );
@ -3435,7 +3460,7 @@ static void output_module( struct makefile *make, unsigned int arch )
strarray_add( &make->all_targets[link_arch], module_name );
if (make->data_only)
add_install_rule( make, make->module, link_arch, module_name,
strmake( "d$(dlldir)/%s%s", arch_pe_dirs[arch], make->module ));
strmake( "d$(libdir)/wine/%s%s", arch_pe_dirs[arch], make->module ));
else
add_install_rule( make, make->module, link_arch, module_name,
strmake( "%c%s%s%s", '0' + arch, arch_install_dirs[arch], make->module,
@ -4159,7 +4184,7 @@ static void output_stub_makefile( struct makefile *make )
output_filenames( targets );
output_filenames( make->clean_files );
output( ":\n" );
output( "\t@cd %s && $(MAKE) %s/$@\n", get_relative_path( make->obj_dir, "" ), make->obj_dir );
output( "\t@cd %s && $(MAKE) %s/$@\n", get_root_relative_path( make ), make->obj_dir );
output( ".PHONY:" );
output_filenames( targets );
output( "\n" );
@ -4529,7 +4554,7 @@ int main( int argc, char *argv[] )
arch_dirs[0] = "";
arch_pe_dirs[0] = strmake( "%s-windows/", archs.str[0] );
arch_install_dirs[0] = unix_lib_supported ? strmake( "$(dlldir)/%s-unix/", archs.str[0] ) : "$(dlldir)/";
arch_install_dirs[0] = unix_lib_supported ? strmake( "$(libdir)/wine/%s-unix/", archs.str[0] ) : "$(libdir)/wine/";
strip_progs[0] = "\"$(STRIP)\"";
for (arch = 1; arch < archs.count; arch++)
@ -4539,7 +4564,7 @@ int main( int argc, char *argv[] )
strarray_add( &target_flags[arch], target );
arch_dirs[arch] = strmake( "%s-windows/", archs.str[arch] );
arch_pe_dirs[arch] = arch_dirs[arch];
arch_install_dirs[arch] = strmake( "$(dlldir)/%s", arch_dirs[arch] );
arch_install_dirs[arch] = strmake( "$(libdir)/wine/%s", arch_dirs[arch] );
strip_progs[arch] = strmake( "%s-strip", target );
dll_ext[arch] = "";
}

View File

@ -26,8 +26,8 @@ SOURCES = \
widl_EXTRADEFS = \
-DINCLUDEDIR="\"${includedir}\"" \
-DDLLDIR="\"${dlldir}\"" \
-DDLLDIR="\"${libdir}/wine\"" \
-DBIN_TO_INCLUDEDIR=\"`${MAKEDEP} -R ${bindir} ${includedir}`\" \
-DBIN_TO_DLLDIR=\"`${MAKEDEP} -R ${bindir} ${dlldir}`\"
-DBIN_TO_DLLDIR=\"`${MAKEDEP} -R ${bindir} ${libdir}/wine`\"
INSTALL_DEV = $(PROGRAMS)

View File

@ -12,7 +12,7 @@ SOURCES = \
write.c
wmc_EXTRADEFS = \
-DNLSDIR="\"${nlsdir}\"" \
-DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\"
-DNLSDIR="\"${datadir}/wine/nls\"" \
-DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${datadir}/wine/nls`\"
INSTALL_DEV = $(PROGRAMS)

View File

@ -15,9 +15,9 @@ SOURCES = \
wrc.man.in
wrc_EXTRADEFS = \
-DNLSDIR="\"${nlsdir}\"" \
-DNLSDIR="\"${datadir}/wine/nls\"" \
-DINCLUDEDIR="\"${includedir}\"" \
-DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\" \
-DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${datadir}/wine/nls`\" \
-DBIN_TO_INCLUDEDIR=\"`${MAKEDEP} -R ${bindir} ${includedir}`\"
INSTALL_DEV = $(PROGRAMS)