diff --git a/src/dorkbox/util/jna/windows/MsImg32.java b/src/dorkbox/util/jna/windows/MsImg32.java deleted file mode 100644 index 142f6bb..0000000 --- a/src/dorkbox/util/jna/windows/MsImg32.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2017 dorkbox, llc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package dorkbox.util.jna.windows; - -import com.sun.jna.Native; -import com.sun.jna.NativeLibrary; -import com.sun.jna.platform.win32.WinDef; -import com.sun.jna.win32.W32APIOptions; - -import dorkbox.util.jna.windows.structs.BLENDFUNCTION; - -public -class MsImg32 { - static { - Native.register(NativeLibrary.getInstance("Msimg32", W32APIOptions.DEFAULT_OPTIONS)); - } - - public static final int ETO_OPAQUE = 2; - public static final int SRCCOPY = 0xCC0020; - - /** - * http://msdn.microsoft.com/en-us/library/windows/desktop/dd183351(v=vs.85).aspx - */ - public static native - boolean AlphaBlend(WinDef.HDC hdcDest, int xoriginDest, int yoriginDest, int wDest, int hDest, WinDef.HDC hdcSrc, int xoriginSrc, - int yoriginSrc, int wSrc, int hSrc, BLENDFUNCTION.ByValue ftn); -} diff --git a/src/dorkbox/util/jna/windows/structs/BLENDFUNCTION.java b/src/dorkbox/util/jna/windows/structs/BLENDFUNCTION.java deleted file mode 100644 index b89dd9d..0000000 --- a/src/dorkbox/util/jna/windows/structs/BLENDFUNCTION.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2017 dorkbox, llc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package dorkbox.util.jna.windows.structs; - -import java.util.Arrays; -import java.util.List; - -import com.sun.jna.Structure; -import com.sun.jna.platform.win32.WinUser; - -public class BLENDFUNCTION extends Structure { - public static class ByValue extends BLENDFUNCTION implements Structure.ByValue { - } - - public static class ByReference extends BLENDFUNCTION implements Structure.ByReference { - } - - public byte BlendOp = WinUser.AC_SRC_OVER; // only valid value - public byte BlendFlags = 0; // only valid value - public byte SourceConstantAlpha; - public byte AlphaFormat; - - public - BLENDFUNCTION() { - } - - @Override - protected - List getFieldOrder() { - return Arrays.asList("BlendOp", "BlendFlags", "SourceConstantAlpha", "AlphaFormat"); - } -} diff --git a/src/dorkbox/util/jna/windows/structs/DRAWITEMSTRUCT.java b/src/dorkbox/util/jna/windows/structs/DRAWITEMSTRUCT.java deleted file mode 100644 index ffb710d..0000000 --- a/src/dorkbox/util/jna/windows/structs/DRAWITEMSTRUCT.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2017 dorkbox, llc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package dorkbox.util.jna.windows.structs; - -import static com.sun.jna.platform.win32.WinDef.HDC; -import static com.sun.jna.platform.win32.WinDef.HWND; - -import java.util.Arrays; -import java.util.List; - -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import com.sun.jna.platform.win32.BaseTSD; -import com.sun.jna.platform.win32.WinDef; - -/** - * http://msdn.microsoft.com/en-us/library/windows/desktop/bb775802(v=vs.85).aspx - */ -public class DRAWITEMSTRUCT extends Structure { - - public static class ByValue extends DRAWITEMSTRUCT implements Structure.ByValue { - } - - public static class ByReference extends DRAWITEMSTRUCT implements Structure.ByReference { - } - - public static final int ODT_BUTTON = 4; - public static final int ODT_COMBOBOX = 3; - public static final int ODT_LISTBOX = 2; - public static final int ODT_LISTVIEW = 102; - public static final int ODT_MENU = 1; - public static final int ODT_STATIC = 5; - public static final int ODT_TAB = 101; - - public static final int ODS_SELECTED = 1; - - public int CtlType; - public int CtlID; - public int itemID; - public int itemAction; - public int itemState; - public HWND hwndItem; - public HDC hDC; - public WinDef.RECT rcItem; - public BaseTSD.ULONG_PTR itemData; - - public DRAWITEMSTRUCT() { - } - - public DRAWITEMSTRUCT(Pointer p) { - super(p); - - read(); - } - - @Override - protected - List getFieldOrder() { - return Arrays.asList("CtlType", "CtlID", "itemID", "itemAction", "itemState", "hwndItem", "hDC", "rcItem", "itemData"); - } -} diff --git a/src/dorkbox/util/jna/windows/structs/MEASUREITEMSTRUCT.java b/src/dorkbox/util/jna/windows/structs/MEASUREITEMSTRUCT.java deleted file mode 100644 index c9b5ad2..0000000 --- a/src/dorkbox/util/jna/windows/structs/MEASUREITEMSTRUCT.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2017 dorkbox, llc - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package dorkbox.util.jna.windows.structs; - -import java.util.Arrays; -import java.util.List; - -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import com.sun.jna.platform.win32.BaseTSD; - -/** - * http://msdn.microsoft.com/en-us/library/windows/desktop/bb775804(v=vs.85).aspx - */ -public class MEASUREITEMSTRUCT extends Structure { - public static class ByValue extends MEASUREITEMSTRUCT implements Structure.ByValue { - } - - public static class ByReference extends MEASUREITEMSTRUCT implements Structure.ByReference { - } - - public static final int ODT_MENU = 1; - public static final int ODT_LISTBOX = 2; - public static final int ODT_COMBOBOX = 3; - public static final int ODT_BUTTON = 4; - public static final int ODT_STATIC = 5; - - public int CtlType; - public int CtlID; - public int itemID; - public int itemWidth; - public int itemHeight; - public BaseTSD.ULONG_PTR itemData; - - public MEASUREITEMSTRUCT() { - } - - public MEASUREITEMSTRUCT(Pointer p) { - super(p); - - read(); - } - - @Override - protected - List getFieldOrder() { - return Arrays.asList("CtlType", "CtlID", "itemID", "itemWidth", "itemHeight", "itemData"); - } -}