[PATCH 3/5] d2d1: Implement property parsing for RegisterEffectFromStream().
Nikolay Sivov
nsivov at codeweavers.com
Mon Jun 6 03:36:02 CDT 2022
On 6/6/22 10:35, Ziqing Hui wrote:
> struct d2d_effect_info
> {
> const CLSID *clsid;
> UINT32 default_input_count;
> UINT32 min_inputs;
> UINT32 max_inputs;
> + WCHAR *display_name;
> + WCHAR *author;
> + WCHAR *category;
> + WCHAR *description;
> };
Shouldn't these also be expressed as properties?
> +static D2D1_PROPERTY_TYPE str_to_property_type(const WCHAR *str)
> +{
> + unsigned int i;
> +
> + static const WCHAR *type_str[] =
> + {
> + L"", L"string", L"bool", L"uint32", L"int32", L"float", L"vector2", L"vector3",
> + L"vector4", L"blob", L"iunknown", L"enum", L"array", L"clsid", L"matrix3x2",
> + L"matrix4x3", L"matrix4x4", L"matrix5x4", L"colorcontext",
> + };
> +
> + for (i = 1; i < ARRAY_SIZE(type_str); ++i)
> + {
> + if (!wcscmp(str, type_str[i]))
> + return i;
> + }
> +
> + return D2D1_PROPERTY_TYPE_UNKNOWN;
> +}
This uses numeric values of D2D1_PROPERTY_TYPE, that deserves at least a
comment.
More information about the wine-devel
mailing list