69 | * Microsoft Shell Controls And Automation
70 | *file | shell32.dll |
---|
guid | {50A7E9B0-70EF-11D1-B75A-00A0C90564FE} |
---|---|
major | 1 |
minor | 0 |
guid | {00020905-0000-0000-C000-000000000046} |
---|---|
major | 8 |
minor | 4 |
uuid(${entry.guid})
41 | [#list entry.sourceInterfaces as iface] 42 | *source(${fh.replaceJavaKeyword(iface)})
43 | [/#list] 44 | [#list interfaces as iface] 45 | *interface(${fh.replaceJavaKeyword(iface)})
46 | [/#list] 47 | */ 48 | @ComObject(clsId = "${entry.guid}") 49 | public interface ${javaName} extends IUnknown[#list interfaces as iface] 50 | ,${fh.replaceJavaKeyword(iface)}[/#list] 51 | { 52 | 53 | } -------------------------------------------------------------------------------- /src/main/resources/eu/doppel_helix/jna/tlbcodegenerator/Enum.ftl: -------------------------------------------------------------------------------- 1 | [#ftl] 2 | [#-- 3 | Copyright (c) 2016 Matthias Bläsing, All Rights Reserved 4 | 5 | The contents of this file is dual-licensed under 2 6 | alternative Open Source/Free licenses: LGPL 2.1 or later and 7 | Apache License 2.0. 8 | 9 | You can freely decide which license you want to apply to 10 | the project. 11 | 12 | You may obtain a copy of the LGPL License at: 13 | 14 | http://www.gnu.org/licenses/licenses.html 15 | 16 | A copy is also included in the downloadable source code package 17 | containing JNA, in file "LGPL2.1". 18 | 19 | You may obtain a copy of the Apache License at: 20 | 21 | http://www.apache.org/licenses/ 22 | 23 | A copy is also included in the downloadable source code package 24 | containing JNA, in file "AL2.0". 25 | --] 26 | 27 | package ${package}; 28 | 29 | import com.sun.jna.platform.win32.COM.util.IComEnum; 30 | 31 | [#if (entry.docString)?has_content || (entry.guid)?has_content] 32 | /** 33 | [#if (entry.docString)?has_content] * ${entry.docString!} 34 | * 35 | [/#if][#if (entry.guid)?has_content] *uuid(${entry.guid})
36 | [/#if] */ 37 | [/#if] 38 | public enum ${javaName} implements IComEnum { 39 | [#list entry.members as member] 40 | 41 | /** 42 | * [#if (member.documentation)?has_content]${member.documentation!} [/#if](${member.value?c}) 43 | */ 44 | ${fh.replaceJavaKeyword(member.name)}(${member.value?c}), 45 | [/#list] 46 | ; 47 | 48 | private ${javaName}(long value) { 49 | this.value = value; 50 | } 51 | private long value; 52 | 53 | public long getValue() { 54 | return this.value; 55 | } 56 | } -------------------------------------------------------------------------------- /src/main/resources/eu/doppel_helix/jna/tlbcodegenerator/Interface.ftl: -------------------------------------------------------------------------------- 1 | [#ftl] 2 | [#-- 3 | Copyright (c) 2016 Matthias Bläsing, All Rights Reserved 4 | 5 | The contents of this file is dual-licensed under 2 6 | alternative Open Source/Free licenses: LGPL 2.1 or later and 7 | Apache License 2.0. 8 | 9 | You can freely decide which license you want to apply to 10 | the project. 11 | 12 | You may obtain a copy of the LGPL License at: 13 | 14 | http://www.gnu.org/licenses/licenses.html 15 | 16 | A copy is also included in the downloadable source code package 17 | containing JNA, in file "LGPL2.1". 18 | 19 | You may obtain a copy of the Apache License at: 20 | 21 | http://www.apache.org/licenses/ 22 | 23 | A copy is also included in the downloadable source code package 24 | containing JNA, in file "AL2.0". 25 | --] 26 | 27 | [#macro paramList params][#list params as param] 28 | [#if param?index > 0] [/#if][#if (param.out)]VARIANT[#else]${typeLib.mapPrimitiveIfExists(param.javaType)}[/#if] ${param.name}[#sep], 29 | [/#sep][/#list][/#macro] 30 | [#macro paramListDoc params][#list params as param] 31 | * @param ${param.name} ${"["}[#if (param.in)]in[/#if][#if (param.out)]out[/#if][#if (param.optional)], optional[/#if]${"]"} {@code ${param.type}} 32 | [/#list][/#macro] 33 | 34 | package ${package}; 35 | 36 | import com.sun.jna.platform.win32.COM.util.annotation.ComInterface; 37 | import com.sun.jna.platform.win32.COM.util.annotation.ComMethod; 38 | import com.sun.jna.platform.win32.COM.util.annotation.ComProperty; 39 | import com.sun.jna.platform.win32.COM.util.IDispatch; 40 | import com.sun.jna.platform.win32.COM.util.IUnknown; 41 | import com.sun.jna.platform.win32.COM.util.IRawDispatchHandle; 42 | import com.sun.jna.platform.win32.Variant.VARIANT; 43 | 44 | /** 45 | [#if (entry.docString)?has_content] * ${entry.docString!} 46 | * 47 | [/#if] *uuid(${entry.guid})
48 | */ 49 | @ComInterface(iid="${entry.guid}") 50 | public interface ${javaName} extends IUnknown, IRawDispatchHandle[#if (entry.dual || entry.dispatch || entry.dispatchable)], IDispatch[/#if] { 51 | [#list entry.functions as function] 52 | /** 53 | [#if (function.documentation)?has_content] 54 | * ${function.documentation} 55 | * 56 | [/#if] 57 | *id(${fh.formatHex(function.memberId)})
58 | [#if (function.vtableId)?has_content] 59 | *vtableId(${function.vtableId})
60 | [/#if] 61 | [@paramListDoc params=function.params/] 62 | */ 63 | [#if function.property]@ComProperty[#else]@ComMethod[/#if](name = "${function.methodName}", dispId = ${fh.formatHex(function.memberId)}) 64 | ${typeLib.mapPrimitiveIfExists(function.returnType)} ${fh.prepareProperty(function.methodName, function.property, function.setter)}([@paramList params=function.params/]); 65 | 66 | [/#list] 67 | 68 | [#list entry.dispatchableVariables as variable] 69 | /** 70 | [#if (variable.documentation)?has_content] 71 | * ${variable.documentation} 72 | * 73 | [/#if] 74 | *id(${fh.formatHex(variable.memberId)})
75 | */ 76 | @ComProperty(name = "${variable.name}", dispId = ${fh.formatHex(variable.memberId)}) 77 | ${typeLib.mapPrimitiveIfExists(variable.type)} ${fh.preparePropertyGetter(variable.name)}(); 78 | 79 | [#if ! variable.readonly] 80 | /** 81 | [#if (variable.documentation)?has_content] 82 | * ${variable.documentation} 83 | * 84 | [/#if] 85 | *id(${fh.formatHex(variable.memberId)})
86 | */ 87 | @ComProperty(name = "${variable.name}", dispId = ${fh.formatHex(variable.memberId)}) 88 | void ${fh.preparePropertySetter(variable.name)}(${typeLib.mapPrimitiveIfExists(variable.type)} value); 89 | 90 | [/#if] 91 | [/#list] 92 | } -------------------------------------------------------------------------------- /src/main/resources/eu/doppel_helix/jna/tlbcodegenerator/InterfaceListener.ftl: -------------------------------------------------------------------------------- 1 | [#ftl] 2 | [#-- 3 | Copyright (c) 2016 Matthias Bläsing, All Rights Reserved 4 | 5 | The contents of this file is dual-licensed under 2 6 | alternative Open Source/Free licenses: LGPL 2.1 or later and 7 | Apache License 2.0. 8 | 9 | You can freely decide which license you want to apply to 10 | the project. 11 | 12 | You may obtain a copy of the LGPL License at: 13 | 14 | http://www.gnu.org/licenses/licenses.html 15 | 16 | A copy is also included in the downloadable source code package 17 | containing JNA, in file "LGPL2.1". 18 | 19 | You may obtain a copy of the Apache License at: 20 | 21 | http://www.apache.org/licenses/ 22 | 23 | A copy is also included in the downloadable source code package 24 | containing JNA, in file "AL2.0". 25 | --] 26 | [#macro paramList params][#list params as param] 27 | [#if param?index > 0] [/#if][#if (param.out)]VARIANT[#else]${typeLib.mapPrimitiveIfExists(param.type)}[/#if] ${param.name}[#sep], 28 | [/#sep][/#list][/#macro] 29 | 30 | package ${package}; 31 | 32 | import com.sun.jna.platform.win32.COM.util.annotation.ComMethod; 33 | import com.sun.jna.platform.win32.COM.util.annotation.ComInterface; 34 | import com.sun.jna.platform.win32.COM.util.IDispatch; 35 | import com.sun.jna.platform.win32.Variant.VARIANT; 36 | 37 | /** 38 | [#if (entry.docString)?has_content] * ${entry.docString!} 39 | * 40 | [/#if] *uuid(${entry.guid})
41 | */ 42 | @ComInterface(iid="${entry.guid}") 43 | public interface ${javaName} { 44 | [#list entry.functions as function] 45 | [#assign returnValue=typeLib.mapPrimitiveIfExists(function.returnType)] 46 | /** 47 | [#if (function.documentation)?has_content] 48 | * ${function.documentation} 49 | * 50 | [/#if] 51 | *id(${fh.formatHex(function.memberId)})
52 | */ 53 | @ComMethod(name = "${function.methodName}", dispId = ${fh.formatHex(function.memberId)}) 54 | ${returnValue} ${fh.prepareProperty(function.methodName, function.property, function.setter)}([@paramList params=function.params/]); 55 | 56 | [/#list] 57 | 58 | } -------------------------------------------------------------------------------- /src/main/resources/eu/doppel_helix/jna/tlbcodegenerator/InterfaceListenerHandler.ftl: -------------------------------------------------------------------------------- 1 | [#ftl] 2 | [#-- 3 | Copyright (c) 2016 Matthias Bläsing, All Rights Reserved 4 | 5 | The contents of this file is dual-licensed under 2 6 | alternative Open Source/Free licenses: LGPL 2.1 or later and 7 | Apache License 2.0. 8 | 9 | You can freely decide which license you want to apply to 10 | the project. 11 | 12 | You may obtain a copy of the LGPL License at: 13 | 14 | http://www.gnu.org/licenses/licenses.html 15 | 16 | A copy is also included in the downloadable source code package 17 | containing JNA, in file "LGPL2.1". 18 | 19 | You may obtain a copy of the Apache License at: 20 | 21 | http://www.apache.org/licenses/ 22 | 23 | A copy is also included in the downloadable source code package 24 | containing JNA, in file "AL2.0". 25 | --] 26 | [#macro paramList params][#list params as param] 27 | [#if param?index > 0] [/#if][#if (param.out)]VARIANT[#else]${typeLib.mapPrimitiveIfExists(param.type)}[/#if] ${param.name}[#sep], 28 | [/#sep][/#list][/#macro] 29 | 30 | package ${package}; 31 | 32 | import com.sun.jna.platform.win32.COM.util.AbstractComEventCallbackListener; 33 | import com.sun.jna.platform.win32.COM.util.annotation.ComEventCallback; 34 | import com.sun.jna.platform.win32.COM.util.annotation.ComInterface; 35 | import com.sun.jna.platform.win32.COM.util.IDispatch; 36 | import com.sun.jna.platform.win32.Variant.VARIANT; 37 | 38 | /** 39 | [#if (entry.docString)?has_content] * ${entry.docString!} 40 | * 41 | [/#if] *uuid(${entry.guid})
42 | */ 43 | public abstract class ${javaName}Handler extends AbstractComEventCallbackListener implements ${javaName} { 44 | @Override 45 | public void errorReceivingCallbackEvent(java.lang.String string, java.lang.Exception excptn) { 46 | } 47 | 48 | [#list entry.functions as function] 49 | [#assign returnValue=typeLib.mapPrimitiveIfExists(function.returnType)] 50 | /** 51 | [#if (function.documentation)?has_content] 52 | * ${function.documentation} 53 | * 54 | [/#if] 55 | *id(${fh.formatHex(function.memberId)})
56 | */ 57 | @Override 58 | public [#if returnValue != 'void']abstract [/#if]${returnValue} ${fh.prepareProperty(function.methodName, function.property, function.setter)}([@paramList params=function.params/])[#if returnValue != 'void'];[#else]{ 59 | }[/#if] 60 | 61 | [/#list] 62 | 63 | } -------------------------------------------------------------------------------- /src/main/resources/eu/doppel_helix/jna/tlbcodegenerator/Package.ftl: -------------------------------------------------------------------------------- 1 | [#ftl] 2 | [#-- 3 | Copyright (c) 2016 Matthias Bläsing, All Rights Reserved 4 | 5 | The contents of this file is dual-licensed under 2 6 | alternative Open Source/Free licenses: LGPL 2.1 or later and 7 | Apache License 2.0. 8 | 9 | You can freely decide which license you want to apply to 10 | the project. 11 | 12 | You may obtain a copy of the LGPL License at: 13 | 14 | http://www.gnu.org/licenses/licenses.html 15 | 16 | A copy is also included in the downloadable source code package 17 | containing JNA, in file "LGPL2.1". 18 | 19 | You may obtain a copy of the Apache License at: 20 | 21 | http://www.apache.org/licenses/ 22 | 23 | A copy is also included in the downloadable source code package 24 | containing JNA, in file "AL2.0". 25 | --] 26 | 27 | /** 28 | * ${name} 29 | [#if (docString)?has_content] * 30 | *${docString!}
31 | * 32 | [/#if] *uuid(${guid})
33 | *version(${majorversion?c}.${minorversion?c})
34 | */ 35 | package ${package}; -------------------------------------------------------------------------------- /src/main/resources/eu/doppel_helix/jna/tlbcodegenerator/output/CoClass.ftl: -------------------------------------------------------------------------------- 1 | [#ftl] 2 | [#-- 3 | Copyright (c) 2016 Matthias Bläsing, All Rights Reserved 4 | 5 | The contents of this file is dual-licensed under 2 6 | alternative Open Source/Free licenses: LGPL 2.1 or later and 7 | Apache License 2.0. 8 | 9 | You can freely decide which license you want to apply to 10 | the project. 11 | 12 | You may obtain a copy of the LGPL License at: 13 | 14 | http://www.gnu.org/licenses/licenses.html 15 | 16 | A copy is also included in the downloadable source code package 17 | containing JNA, in file "LGPL2.1". 18 | 19 | You may obtain a copy of the Apache License at: 20 | 21 | http://www.apache.org/licenses/ 22 | 23 | A copy is also included in the downloadable source code package 24 | containing JNA, in file "AL2.0". 25 | --] 26 | ${package}.${javaName} (${entry.guid}) 27 | [#list entry.sourceInterfaces as iface] 28 | Source(${fh.replaceJavaKeyword(iface)}) 29 | [/#list] 30 | [#list interfaces as iface] 31 | Extends(${fh.replaceJavaKeyword(iface)}) 32 | [/#list] -------------------------------------------------------------------------------- /src/main/resources/eu/doppel_helix/jna/tlbcodegenerator/output/Enum.ftl: -------------------------------------------------------------------------------- 1 | [#ftl] 2 | [#-- 3 | Copyright (c) 2016 Matthias Bläsing, All Rights Reserved 4 | 5 | The contents of this file is dual-licensed under 2 6 | alternative Open Source/Free licenses: LGPL 2.1 or later and 7 | Apache License 2.0. 8 | 9 | You can freely decide which license you want to apply to 10 | the project. 11 | 12 | You may obtain a copy of the LGPL License at: 13 | 14 | http://www.gnu.org/licenses/licenses.html 15 | 16 | A copy is also included in the downloadable source code package 17 | containing JNA, in file "LGPL2.1". 18 | 19 | You may obtain a copy of the Apache License at: 20 | 21 | http://www.apache.org/licenses/ 22 | 23 | A copy is also included in the downloadable source code package 24 | containing JNA, in file "AL2.0". 25 | --] 26 | ${package}.${javaName} (${entry.guid!}) 27 | [#list entry.members as member] 28 | ${fh.replaceJavaKeyword(member.name)}(${member.value?c}) 29 | [/#list] -------------------------------------------------------------------------------- /src/main/resources/eu/doppel_helix/jna/tlbcodegenerator/output/Interface.ftl: -------------------------------------------------------------------------------- 1 | [#ftl] 2 | [#-- 3 | Copyright (c) 2016 Matthias Bläsing, All Rights Reserved 4 | 5 | The contents of this file is dual-licensed under 2 6 | alternative Open Source/Free licenses: LGPL 2.1 or later and 7 | Apache License 2.0. 8 | 9 | You can freely decide which license you want to apply to 10 | the project. 11 | 12 | You may obtain a copy of the LGPL License at: 13 | 14 | http://www.gnu.org/licenses/licenses.html 15 | 16 | A copy is also included in the downloadable source code package 17 | containing JNA, in file "LGPL2.1". 18 | 19 | You may obtain a copy of the Apache License at: 20 | 21 | http://www.apache.org/licenses/ 22 | 23 | A copy is also included in the downloadable source code package 24 | containing JNA, in file "AL2.0". 25 | --] 26 | [#macro paramList params][#list params as param] 27 | [#if param?index > 0] [/#if][#if (param.out)]VARIANT[#else]${typeLib.mapPrimitiveIfExists(param.javaType)} /* ${typeLib.mapPrimitiveIfExists(param.type)} */[/#if] ${param.name}[#sep], [/#sep][/#list][/#macro] 28 | 29 | ${package}.${javaName} (${entry.guid!}) 30 | [#list entry.functions as function] 31 | ${r"["}memberId=${function.memberId?c}, vtableID=${function.vtableId?c}${r"]"} 32 | ${typeLib.mapPrimitiveIfExists(function.returnType)} ${fh.prepareProperty(function.methodName, function.property, function.setter)}([@paramList params=function.params/]) 33 | [/#list] -------------------------------------------------------------------------------- /src/main/resources/eu/doppel_helix/jna/tlbcodegenerator/output/InterfaceListener.ftl: -------------------------------------------------------------------------------- 1 | [#ftl] 2 | [#-- 3 | Copyright (c) 2016 Matthias Bläsing, All Rights Reserved 4 | 5 | The contents of this file is dual-licensed under 2 6 | alternative Open Source/Free licenses: LGPL 2.1 or later and 7 | Apache License 2.0. 8 | 9 | You can freely decide which license you want to apply to 10 | the project. 11 | 12 | You may obtain a copy of the LGPL License at: 13 | 14 | http://www.gnu.org/licenses/licenses.html 15 | 16 | A copy is also included in the downloadable source code package 17 | containing JNA, in file "LGPL2.1". 18 | 19 | You may obtain a copy of the Apache License at: 20 | 21 | http://www.apache.org/licenses/ 22 | 23 | A copy is also included in the downloadable source code package 24 | containing JNA, in file "AL2.0". 25 | --] 26 | [#macro paramList params][#list params as param] 27 | [#if param?index > 0] [/#if][#if (param.out)]VARIANT[#else]${typeLib.mapPrimitiveIfExists(param.type)}[/#if] ${param.name}[#sep], [/#sep][/#list][/#macro] 28 | 29 | ${package}.${javaName} (${entry.guid!}) [SOURCE] 30 | [#list entry.functions as function] 31 | ${r"["}memberId=${function.memberId?c}, vtableID=${function.vtableId?c}${r"]"} 32 | ${typeLib.mapPrimitiveIfExists(function.returnType)} ${fh.prepareProperty(function.methodName, function.property, function.setter)}([@paramList params=function.params/]) 33 | [/#list] --------------------------------------------------------------------------------