-
-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add um::d2d1_1 / rep um::wincodec, more #409
Conversation
cross reference is d2d1_1 and wincodec updates at the same time. ## add(full impl) * um::d2d1_1 * um::d2d1effects * um::d2d1effectauthor ## replace(full impl) * um::wincodec ## add(minimal impl) * um::documenttarget * um::ocidl ## update(add interface) * um::ocidl(IErrorLog) * shared;;wtypes(CLIPFORMAT)
…ure/wincodec_d2d1_1
fnn...
Make sure. |
src/um/d2d1effects.rs
Outdated
// except according to those terms. | ||
//! Mappings for the contents of d2d1effects.h | ||
|
||
DEFINE_GUID!{CLSID_D2D12DAffineTransform, 0x6AA97485, 0x6354, 0x4cfc, 0x90, 0x8C, 0xE4, 0xA7, 0x4F, 0x62, 0xC9, 0x6C} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The numbers should go on a second line, like so:
DEFINE_GUID!{CLSID_D2D12DAffineTransform,
0x6AA97485, 0x6354, 0x4cfc, 0x90, 0x8C, 0xE4, 0xA7, 0x4F, 0x62, 0xC9, 0x6C}
src/um/d2d1effects.rs
Outdated
@@ -0,0 +1,644 @@ | |||
// Copyright © 2016-2017 winapi-rs developers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be just 2017?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referring to #308.
Change in 2017.
// Copyright © 2017 winapi-rs developers
// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// All files in the project carrying such notice may not be copied, modified, or distributed
// except according to those terms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever adding a new file, the start year for the copyright should be the year that file was added. Since you're adding this file in 2017, the start year should be 2017.
src/um/oaidl.rs
Outdated
use shared::wtypesbase::{ | ||
BYTE_SIZEDARR, DOUBLE, DWORD_SIZEDARR, HYPER_SIZEDARR, LPOLESTR, SCODE, WORD_SIZEDARR, | ||
}; | ||
use shared::wtypes::{BSTR, CY, DATE, DECIMAL, VARIANT_BOOL, VARTYPE, VT_BSTR, VT_DISPATCH, VT_ERROR, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please stick to the way the imports were indented before.
src/um/wincodec.rs
Outdated
@@ -1,373 +1,1973 @@ | |||
// Copyright © 2015-2017 winapi-rs developers | |||
// Copyright © 2016-2017 winapi-rs developers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change the start year.
src/um/wincodec.rs
Outdated
use shared::basetsd::UINT32; | ||
use shared::guiddef::{GUID, REFGUID}; | ||
use shared::minwindef::{BOOL, BYTE, DWORD, FLOAT, INT, UINT, ULONG}; | ||
#![allow(overflowing_literals, unused_qualifications, unused)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you ignoring this lints?
src/um/d2d1_1.rs
Outdated
ID2D1BitmapBrush, ID2D1BitmapBrushVtbl, ID2D1PathGeometry, ID2D1PathGeometryVtbl, | ||
ID2D1GradientStopCollection, ID2D1GradientStopCollectionVtbl, ID2D1DrawingStateBlock, | ||
ID2D1DrawingStateBlockVtbl, ID2D1RenderTarget, ID2D1RenderTargetVtbl, ID2D1Factory, | ||
ID2D1FactoryVtbl}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use block indentation for multiline imports.
src/um/d2d1_1.rs
Outdated
) -> HRESULT, | ||
fn GetPropertyNameLength(index: UINT32) -> UINT32, | ||
fn GetType (index: UINT32) -> D2D1_PROPERTY_TYPE, | ||
fn GetPropertyIndex (name: PCWSTR) -> UINT32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No aligned indentation.
src/um/wincodec.rs
Outdated
interface IWICBitmapFlipRotator(IWICBitmapFlipRotatorVtbl) | ||
: IWICBitmapSource(IWICBitmapSourceVtbl) { | ||
|
||
RIDL!(#[uuid(0x5009834F, 0x2D6A, 0x41ce, 0x9E, 0x1B, 0x17, 0xC5, 0xAF, 0xF7, 0xA7, 0x82)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uuids should be lowercase hex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Horrible mistake manual numeric editing. Want to follow the original description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually used a bit of C++ code to print out the uuids for me with the correct formatting and casing, and then I'd copy the output over.
#define PRINT_ID(x) cout << "0x" << setw(8) << x.Data1 << ", 0x" << setw(4) << x.Data2 << ", 0x" << setw(4) << x.Data3 << ", 0x" << setw(2) << (unsigned)x.Data4[0] << ", 0x" << setw(2) << (unsigned)x.Data4[1] << ", 0x" << setw(2) << (unsigned)x.Data4[2] << ", 0x" << setw(2) << (unsigned)x.Data4[3] << ", 0x" << setw(2) << (unsigned)x.Data4[4] << ", 0x" << setw(2) << (unsigned)x.Data4[5] << ", 0x" << setw(2) << (unsigned)x.Data4[6] << ", 0x" << setw(2) << (unsigned)x.Data4[7];
#define PRINT_UUID(x) cout << hex << setfill('0') << "RIDL!{#[uuid("; PRINT_ID(__uuidof(x)); cout << ")]\ninterface "#x << endl;
int main() {
PRINT_UUID(IUnknown);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to,
consider the automatic processing.
src/um/d2d1_1.rs
Outdated
pub fn D2D1CreateDevice(dxgiDevice: *const IDXGIDevice, | ||
creationProperties: *const D2D1_CREATION_PROPERTIES, | ||
d2dDevice: *mut *mut ID2D1Device) | ||
-> HRESULT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Block indentation please!
src/um/wincodec.rs
Outdated
@@ -1,369 +1,1975 @@ | |||
// Copyright © 2015-2017 winapi-rs developers | |||
// Copyright © 2017 winapi-rs developers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change the start year of existing files.
src/um/d2d1_1.rs
Outdated
fn GetExtendModeX () -> D2D1_EXTEND_MODE, | ||
fn GetExtendModeY () -> D2D1_EXTEND_MODE, | ||
fn GetInterpolationMode() -> D2D1_INTERPOLATION_MODE, | ||
fn GetSourceRectangle (sourceRectangle: *mut D2D1_RECT_F) -> c_void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh no! Not the aligned indentation!
Fix all. |
…ure/wincodec_d2d1_1
PR has conflicts. |
src/um/wincodec.rs
Outdated
use shared::guiddef::{REFGUID, GUID, CLSID, REFCLSID}; | ||
use shared::dxgiformat::DXGI_FORMAT; | ||
use shared::dxgitype::{DXGI_JPEG_AC_HUFFMAN_TABLE, DXGI_JPEG_DC_HUFFMAN_TABLE, | ||
DXGI_JPEG_QUANTIZATION_TABLE}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These imports need to be block indented.
…ure/wincodec_d2d1_1 # Conflicts: # src/um/wincodec.rs
Sorry, The marge build will fail. |
|
FN!, RIDL! Fix |
That test is just checking that the imports are in alphabetical order, both the order of the |
Thank you! Try again. |
src/um/wincodec.rs
Outdated
ENUM!{enum WICJpegIndexingOptions { | ||
WICJpegIndexingOptionsGenerateOnDemand = 0x00000000, | ||
WICJpegIndexingOptionsGenerateOnLoad = 0x00000001, | ||
WICJpegIndexingOptions_FORCE_DWORD = CODEC_FORCE_DWORD, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this indented by only 3 spaces? I see several cases of this across this file.
Fixed. |
cross reference is d2d1_1 and wincodec updates at the same time.
add(full impl)
replace(full impl)
add(minimal impl)
update(add interface)