Skip to content
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

Merged
merged 24 commits into from
Mar 26, 2017
Merged

add um::d2d1_1 / rep um::wincodec, more #409

merged 24 commits into from
Mar 26, 2017

Conversation

ekicyou
Copy link
Contributor

@ekicyou ekicyou commented Mar 23, 2017

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)

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)
@ekicyou
Copy link
Contributor Author

ekicyou commented Mar 23, 2017

fnn...

error: cannot find macro `EXTERN!` in this scope

Make sure.

// 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}
Copy link
Owner

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}

@@ -0,0 +1,644 @@
// Copyright © 2016-2017 winapi-rs developers
Copy link
Owner

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?

Copy link
Contributor Author

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.

Copy link
Owner

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,
Copy link
Owner

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.

@@ -1,373 +1,1973 @@
// Copyright © 2015-2017 winapi-rs developers
// Copyright © 2016-2017 winapi-rs developers
Copy link
Owner

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.

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)]
Copy link
Owner

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};
Copy link
Owner

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,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No aligned indentation.

interface IWICBitmapFlipRotator(IWICBitmapFlipRotatorVtbl)
: IWICBitmapSource(IWICBitmapSourceVtbl) {

RIDL!(#[uuid(0x5009834F, 0x2D6A, 0x41ce, 0x9E, 0x1B, 0x17, 0xC5, 0xAF, 0xF7, 0xA7, 0x82)]
Copy link
Owner

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.

Copy link
Contributor Author

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.

Copy link
Owner

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);
}

Copy link
Contributor Author

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;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block indentation please!

@@ -1,369 +1,1975 @@
// Copyright © 2015-2017 winapi-rs developers
// Copyright © 2017 winapi-rs developers
Copy link
Owner

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
Copy link
Owner

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!

@ekicyou
Copy link
Contributor Author

ekicyou commented Mar 23, 2017

Fix all.

@retep998
Copy link
Owner

PR has conflicts.

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};
Copy link
Owner

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.

@ekicyou
Copy link
Contributor Author

ekicyou commented Mar 24, 2017

Sorry, The marge build will fail.
"FN!" Out the error.
There is a problem?

@retep998
Copy link
Owner

FN! and RIDL! were recently changed to require trailing commas, so you'll have to add a bunch of commas.

@ekicyou
Copy link
Contributor Author

ekicyou commented Mar 24, 2017

FN!, RIDL! Fix
Bat test fail. #412

@retep998
Copy link
Owner

That test is just checking that the imports are in alphabetical order, both the order of the use statements relative to each order, and the order of things inside each use statement.

@ekicyou
Copy link
Contributor Author

ekicyou commented Mar 25, 2017

Thank you! Try again.
prease check #416 request.

ENUM!{enum WICJpegIndexingOptions {
WICJpegIndexingOptionsGenerateOnDemand = 0x00000000,
WICJpegIndexingOptionsGenerateOnLoad = 0x00000001,
WICJpegIndexingOptions_FORCE_DWORD = CODEC_FORCE_DWORD,
Copy link
Owner

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.

@ekicyou
Copy link
Contributor Author

ekicyou commented Mar 25, 2017

Fixed.

@retep998 retep998 merged commit d77d5b7 into retep998:dev Mar 26, 2017
@ekicyou ekicyou deleted the feature/wincodec_d2d1_1 branch March 26, 2017 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants