diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2016-05-18 16:25:35 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-05-18 16:25:35 +0100 |
commit | 8a4c9af839e466e927aa92654d8815dadaa7d37e (patch) | |
tree | ba7c5bf901f0a9aa2f336059dcc1637691b38fe5 /specs | |
parent | f92ea422795fbaf251545a28e9162f148aa4c999 (diff) |
specs: Standardize on EnumFlags.
Diffstat (limited to 'specs')
-rw-r--r-- | specs/d2d1.py | 14 | ||||
-rw-r--r-- | specs/dwrite.py | 8 |
2 files changed, 9 insertions, 13 deletions
diff --git a/specs/d2d1.py b/specs/d2d1.py index 815a121f..39375ab1 100644 --- a/specs/d2d1.py +++ b/specs/d2d1.py @@ -231,7 +231,7 @@ D2D1_BITMAP_INTERPOLATION_MODE = Enum("D2D1_BITMAP_INTERPOLATION_MODE", [ "D2D1_BITMAP_INTERPOLATION_MODE_LINEAR", ]) -D2D1_DRAW_TEXT_OPTIONS = EnumFlag("D2D1_DRAW_TEXT_OPTIONS", [ +D2D1_DRAW_TEXT_OPTIONS = EnumFlags("D2D1_DRAW_TEXT_OPTIONS", [ "D2D1_DRAW_TEXT_OPTIONS_NONE", "D2D1_DRAW_TEXT_OPTIONS_NO_SNAP", "D2D1_DRAW_TEXT_OPTIONS_CLIP", @@ -355,7 +355,7 @@ D2D1_TRIANGLE = Struct("D2D1_TRIANGLE", [ (D2D1_POINT_2F, "point3"), ]) -D2D1_PATH_SEGMENT = EnumFlag("D2D1_PATH_SEGMENT", [ +D2D1_PATH_SEGMENT = EnumFlags("D2D1_PATH_SEGMENT", [ "D2D1_PATH_SEGMENT_NONE", "D2D1_PATH_SEGMENT_FORCE_UNSTROKED", "D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN", @@ -406,7 +406,7 @@ D2D1_STROKE_STYLE_PROPERTIES = Struct("D2D1_STROKE_STYLE_PROPERTIES", [ (FLOAT, "dashOffset"), ]) -D2D1_LAYER_OPTIONS = EnumFlag("D2D1_LAYER_OPTIONS", [ +D2D1_LAYER_OPTIONS = EnumFlags("D2D1_LAYER_OPTIONS", [ "D2D1_LAYER_OPTIONS_NONE", "D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE", ]) @@ -421,7 +421,7 @@ D2D1_LAYER_PARAMETERS = Struct("D2D1_LAYER_PARAMETERS", [ (D2D1_LAYER_OPTIONS, "layerOptions"), ]) -D2D1_WINDOW_STATE = EnumFlag("D2D1_WINDOW_STATE", [ +D2D1_WINDOW_STATE = EnumFlags("D2D1_WINDOW_STATE", [ "D2D1_WINDOW_STATE_NONE", "D2D1_WINDOW_STATE_OCCLUDED", ]) @@ -438,13 +438,13 @@ D2D1_FEATURE_LEVEL = Enum("D2D1_FEATURE_LEVEL", [ "D2D1_FEATURE_LEVEL_10", ]) -D2D1_RENDER_TARGET_USAGE = EnumFlag("D2D1_RENDER_TARGET_USAGE", [ +D2D1_RENDER_TARGET_USAGE = EnumFlags("D2D1_RENDER_TARGET_USAGE", [ "D2D1_RENDER_TARGET_USAGE_NONE", "D2D1_RENDER_TARGET_USAGE_FORCE_BITMAP_REMOTING", "D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE", ]) -D2D1_PRESENT_OPTIONS = EnumFlag("D2D1_PRESENT_OPTIONS", [ +D2D1_PRESENT_OPTIONS = EnumFlags("D2D1_PRESENT_OPTIONS", [ "D2D1_PRESENT_OPTIONS_NONE", "D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS", "D2D1_PRESENT_OPTIONS_IMMEDIATELY", @@ -465,7 +465,7 @@ D2D1_HWND_RENDER_TARGET_PROPERTIES = Struct("D2D1_HWND_RENDER_TARGET_PROPERTIES" (D2D1_PRESENT_OPTIONS, "presentOptions"), ]) -D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS = EnumFlag("D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS", [ +D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS = EnumFlags("D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS", [ "D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE", "D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE", ]) diff --git a/specs/dwrite.py b/specs/dwrite.py index 60e5034c..5d8d2116 100644 --- a/specs/dwrite.py +++ b/specs/dwrite.py @@ -60,10 +60,6 @@ IDWriteGlyphRunAnalysis = Interface("IDWriteGlyphRunAnalysis", IUnknown) IDWriteFactory = Interface("IDWriteFactory", IUnknown) -def EnumFlag(expr, values): - return Flags(Alias(expr, DWORD), values) - - DWRITE_FONT_FILE_TYPE = Enum("DWRITE_FONT_FILE_TYPE", [ "DWRITE_FONT_FILE_TYPE_UNKNOWN", "DWRITE_FONT_FILE_TYPE_CFF", @@ -85,7 +81,7 @@ DWRITE_FONT_FACE_TYPE = Enum("DWRITE_FONT_FACE_TYPE", [ "DWRITE_FONT_FACE_TYPE_UNKNOWN", ]) -DWRITE_FONT_SIMULATIONS = EnumFlag("DWRITE_FONT_SIMULATIONS", [ +DWRITE_FONT_SIMULATIONS = EnumFlags("DWRITE_FONT_SIMULATIONS", [ "DWRITE_FONT_SIMULATIONS_NONE", "DWRITE_FONT_SIMULATIONS_BOLD", "DWRITE_FONT_SIMULATIONS_OBLIQUE", @@ -481,7 +477,7 @@ IDWriteTypography.methods += [ StdMethod(HRESULT, "GetFontFeature", [(UINT32, "fontFeatureIndex"), Out(Pointer(DWRITE_FONT_FEATURE), "fontFeature")]), ] -DWRITE_SCRIPT_SHAPES = EnumFlag("DWRITE_SCRIPT_SHAPES", [ +DWRITE_SCRIPT_SHAPES = EnumFlags("DWRITE_SCRIPT_SHAPES", [ "DWRITE_SCRIPT_SHAPES_DEFAULT", "DWRITE_SCRIPT_SHAPES_NO_VISUAL", ]) |