Comparar commits

..

2487 Commits

Autor SHA1 Mensagem Data
Daniel Doubrovkine (dB.) @dblockdotorg 296e89e7c6 Merge pull request #334 from msteiger/knownfolder
Added Shell32.SHGetKnownFolderPath and corresponding constants
2014-05-26 06:55:28 -04:00
Martin Steiger e52c4255d9 Fixed inheritance of LPVOID and simplified access to CoTaskMem* 2014-05-25 17:32:13 +02:00
Martin Steiger a0eaa3fb95 Merge remote-tracking branch 'twall/master' into knownfolder 2014-05-25 17:02:45 +02:00
Martin Steiger bf870bb9e3 Added Win32 Monitor Configuration API in com.sun.jna.platform.win32.Dxva2. 2014-05-24 15:09:05 -04:00
Martin Steiger 8d4aa48713 Added Shell32.SHGetKnownFolderPath and corresponding constants 2014-05-24 12:55:05 +02:00
Martin Steiger 21d459bb55 Added CoTaskMemAlloc, CoTaskMemRealloc and CoTaskMemFree to com.sun.jna.platform.win32.Ole32. 2014-05-23 11:52:03 -04:00
Tobias 05210b2332 added my changes 2014-05-23 09:57:41 +02:00
Tobias 942380eadd Added Winspool monitor sample and updated Kernel32, WinBase, Winspool
Added a full running Winspool monitor sample to demonstrate how to watch
for new print jobs added to the spooler on windows.
2014-05-23 09:55:38 +02:00
Tobias e0ff9cd8d3 Some minor changes to MS Office samples
Test and small changes to the MS Office samples
2014-05-22 09:55:27 +02:00
Tobias 3470e24b46 New MS Word sample
Providing new samples with MS Word 14 running on Windows 7/64bit
2014-05-21 13:11:18 +02:00
Tobias ab513b62a0 Variant and TlbImp Fix
Small fixes to answer support calls
2014-05-21 11:25:02 +02:00
Timothy Wall da6c521e1c add change entry for PR #319 2014-05-13 06:17:41 -04:00
Timothy Wall 5115f143ce Merge pull request #319 from marco2357/master
fixed direct-mapping type-mapped pointer result types
2014-05-13 06:11:52 -04:00
Timothy Wall 64466deb5e Ensure exception message includes all faulty field information (fixes broken test) 2014-04-21 06:21:58 -04:00
Timothy Wall d8638912f0 fix build on newer mac OSX (10.8/10.9) 2014-04-21 06:06:02 -04:00
Timothy Wall 87c582ce23 Merge pull request #321 from headcr4sh/patch-1
Add syntax highlighting to C- and Java code

Oooh, pretty!
2014-04-20 14:56:04 -04:00
Benjamin P. Jung 9f1361b533 Add syntax highlighting to C- and Java code 2014-04-20 20:08:29 +02:00
Timothy Wall 323a913bf6 Merge pull request #290 from ebourg/master
Exception chaining for com.sun.jna.Structure
2014-04-09 20:56:21 -04:00
Taco deff187509 removed unused imports 2014-04-09 18:49:14 +02:00
Taco cfbe750615 improved testcase 2014-04-09 18:33:31 +02:00
Emmanuel Bourg 32447ce488 Added an entry in the changelog for #290 2014-04-09 17:51:49 +02:00
Emmanuel Bourg 27c7d3ad49 Exception chaining for com.sun.jna.Structure 2014-04-09 17:20:55 +02:00
Timothy Wall 9340b94e63 Merge pull request #314 from andymcd/aarch64
Add and bundle support for AArch64
2014-04-09 07:13:20 -04:00
Taco d7bb1e189f fixed direct-mapping type-mapped pointer result types 2014-04-08 18:23:44 +02:00
Andrew McDermott 6cd4216336 Add and bundle support for AArch64
Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
2014-04-04 05:44:12 +00:00
Daniel Doubrovkine (dB.) @dblockdotorg bbef9fa6ab Fixed link to JavaDoc. 2014-03-31 07:11:38 -04:00
Timothy Wall 28fc8ce789 enable AIX build, update natives 2014-03-18 17:16:31 -07:00
Daniel Doubrovkine (dB.) 8508354adc Merge pull request #307 from tyrcho/patch-1
fix javadoc links
2014-03-08 10:52:17 -05:00
Michel Daviot 6d8bf1eaf4 fix javadoc links 2014-03-08 13:30:41 +01:00
dB d498bd9493 Preparing for development, 4.1.1. 2014-03-06 11:10:44 -05:00
dB c490fc9101 Release 4.1.0 to Maven Central. 2014-03-06 11:06:40 -05:00
dB 05348f6c26 Moved general docs from publishing to maven central to releasing. 2014-03-06 10:58:09 -05:00
dB bfc02645a0 You don't need permissions to Sonatype, the explanation to get java.net access is right above. 2014-03-06 10:48:00 -05:00
dB 46238caafb Push at the very end, so everything is staged. 2014-03-06 08:48:56 -05:00
dB 2a756c628a Switch order of release because download links point to Maven central. 2014-03-06 08:42:10 -05:00
dB 56eb5c7d4a Added documentation on where to request access to Sonatype. 2014-03-06 08:40:13 -05:00
dB 1bd0db1148 Release 4.1.0. 2014-03-06 08:18:49 -05:00
dB dc013ea124 Release 4.1. 2014-03-06 08:04:24 -05:00
dB 34d87fd98f Preparing for 4.1 release. 2014-03-06 08:00:08 -05:00
Timothy Wall 71631fb543 Merge pull request #306 from swills/master
Use getCanonicalPath instead of getAbsolutePath for native library tests
2014-02-27 06:56:42 -05:00
Steve Wills 4934eb644b Use getCanonicalPath instead of getAbsolutePath for these two tests 2014-02-26 23:05:40 +00:00
Timothy Wall f3e7ede297 Tighten prose. 2014-02-23 08:35:06 -05:00
Daniel Doubrovkine (dB.) 2c0d097389 Merge pull request #301 from BusyByte/master
Added Advapi32Util accessCheck method to verify file permissions
2014-01-22 14:35:06 -08:00
pair9 e3aa9cd1a2 Changed Advapi32Test.testAccessCheck to work on non-US-English systems and general cleanup 2014-01-22 16:24:12 -06:00
pair9 d84910a762 Added test for com.sun.jna.platform.win32.Advapi32.AccessCheck and updated changelog markup 2014-01-22 13:24:20 -06:00
Timothy Wall 2c16197d0f Merge branch 'issue-300' of github.com:twall/jna 2014-01-21 22:45:49 -05:00
Timothy Wall 2e4c4349dd Merge branch 'issue-300' of github.com:twall/jna into issue-300 2014-01-21 22:44:53 -05:00
Timothy Wall 5d4e9b14fd update change log 2014-01-21 22:44:25 -05:00
Timothy Wall feecc7fd1e Merge branch 'issue-300' of github.com:twall/jna 2014-01-21 22:42:36 -05:00
Shawn Garner 3f23dc3ffb Addressed code review items from pull request 2014-01-22 02:35:26 +00:00
Shawn Garner 5ce1658269 Added Advapi32Util accessCheck method to verify file permissions 2014-01-21 04:53:49 +00:00
Timothy Wall 75a532b088 update natives 2014-01-13 02:24:32 -05:00
Timothy Wall 8aa8a2e090 update native 2014-01-13 02:23:39 -05:00
Timothy Wall 4836f05059 don't align arguments in stdcall 2014-01-13 02:23:08 -05:00
Timothy Wall ed35e7b973 fix clallback prototype 2014-01-13 01:16:23 -05:00
Timothy Wall 4e4dbda6f0 add extra args, triggering stdcall stack bug 2014-01-13 00:52:47 -05:00
Timothy Wall 6756267f48 attempt to reproduce issue #300 2014-01-12 17:06:13 -05:00
Tobias 87200e8006 Some Changes to the COM support
- New feature for supporting also DispId`s for Tlb generation.
- Added new parameter to TlbImp source code generator for selecting a
custom output directory.
2014-01-03 20:21:57 +01:00
Barry Roberts 35c743df72 Added com.sun.jna.platform.win32.Kernel32.ResetEvent. 2013-12-11 08:58:32 -05:00
Daniel Doubrovkine (dB.) c94c3b9ee0 Merge pull request #292 from ebourg/unused-imports
Remove unused imports
2013-11-15 15:24:33 -08:00
Emmanuel Bourg 1d0988127d Removed unused imports 2013-11-15 23:44:34 +01:00
Daniel Doubrovkine (dB.) e736b45a35 Merge pull request #291 from ebourg/stringbuilders
Replace StringBuffers with StringBuilders
2013-11-15 14:42:39 -08:00
Emmanuel Bourg e67a50c904 Replaced StringBuffers with StringBuilders 2013-11-15 23:11:08 +01:00
Timothy Wall 6f37195ce2 cloudbees test trigger 2013-11-14 07:01:12 -05:00
Timothy Wall 9785311050 cloudbees test trigger 2013-11-14 07:00:51 -05:00
Timothy Wall ed5dac53cc fix typo in javadoc 2013-11-08 07:08:40 -05:00
Daniel Doubrovkine (dB.) 6b25643334 Update CHANGES.md 2013-11-06 11:49:20 -08:00
Daniel Doubrovkine (dB.) 667fdd1e32 Merge pull request #287 from daifei4321/master
Updated Win32WindowDemo.java
2013-11-06 11:46:50 -08:00
Dai Fei a0c486f826 Update CHANGES.md 2013-10-29 15:27:40 +08:00
daifei4321 a41d97d9e8 Update Win32WindowDemo.java
Used DBT.DBTF_MEDIA to replace 1.
Used DBT.DBTF_NET to replace 2.
2013-10-25 16:17:38 +08:00
daifei4321 30b64fb78c Fixed 2 bugs in Win32WindowDemo.java
Added setting dbcc_size before RegisterDeviceNotification.
Create DEV_BROADCAST_DEVICEINTERFACE only when should.
Added extra info (drive letter, change to media in drive or to physical drive, is network drive) for logic drive add/remove.
2013-10-25 16:10:56 +08:00
daifei4321 f277c9dce2 Update DBT.java added DBTF_MEDIA and DBTF_NET 2013-10-25 15:05:24 +08:00
Markus KARG c7dcf61bb6 Added com.sun.jna.platform.win32.Kernel32.GetPrivateProfileSection, GetPrivateProfileSectionNames and WritePrivateProfileSection and corresponding Kernel32Util helpers. 2013-10-07 19:58:36 -04:00
Daniel Doubrovkine (dB.) 438d1313fc Merge pull request #280 from dblock/kc7bfi-merged
#270 + #271: Added OpenGL32 support.
2013-10-06 17:05:45 -07:00
dB e465dca4ce Moved OpenGL declarations in the corresponding file(s) with the Windows SDK. 2013-10-06 20:00:01 -04:00
David Robinson 99bd756eab Added OpenGL32 support. 2013-10-06 14:31:37 -04:00
Timothy Wall b2e16d4f6c fixes issue #279 2013-10-06 13:23:46 -04:00
Timothy Wall 6f13f2e6d9 Accommodate altered libc loading on FreeBSD 2013-10-06 13:21:45 -04:00
Timothy Wall f5d7955f41 clean up new files (line termination and errant unicode) 2013-10-05 16:38:00 -04:00
Daniel Doubrovkine (dB.) 0aab1f52a5 Merge pull request #278 from dblock/lpolestr-fix
Fix: LPOLESTR constructor with a string doesn't allocate memory.
2013-10-05 06:56:49 -07:00
Daniel Doubrovkine (dB.) 8dd1592f70 Merge pull request #276 from dblock/fix-tests
Removed dependency on JNA_LIB and contrib paths.
2013-10-04 04:48:19 -07:00
dB eaf9e25461 Fix: LPOLESTR constructor with a string doesn't allocate memory. 2013-10-04 07:46:51 -04:00
Daniel Doubrovkine (dB.) deb7cc68f4 Merge pull request #277 from dblock/shortcut-clsids
Fix: use shell objects available on all versions of Windows.
2013-10-04 04:31:07 -07:00
dB 5b3a782ab7 Fix: use shell objects available on all versions of Windows. 2013-10-04 07:28:09 -04:00
Daniel Doubrovkine (dB.) 66fcd236cf Merge pull request #272 from dblock/windows-build
Choose whether to use MSVC based on MSVC env.
2013-10-04 04:13:01 -07:00
dB 487dab42de Removed dependency on JNA_LIB and contrib paths. 2013-10-04 06:58:10 -04:00
Daniel Doubrovkine (dB.) bb27c09164 Merge pull request #274 from dblock/fix-tests
Fix: use a different CLSID, remove dependency on Word.
2013-10-04 03:48:58 -07:00
dB f6ceaf3355 Merged from master. 2013-10-04 06:46:13 -04:00
dB cb8f9dd7df Fix: use a different CLSID, remove dependency on Word. 2013-10-03 09:29:33 -04:00
dB 395bffcf72 Choose whether to use MSVC based on MSVC environment variable. 2013-10-02 14:21:26 -04:00
Daniel Doubrovkine 35cc5e2e31 Fix: Win32 unit tests. 2013-09-26 07:28:58 -04:00
Daniel Doubrovkine 4df5e827a7 Merged #253. 2013-09-25 07:21:59 -04:00
Daniel Doubrovkine 8de77d3df3 Merged RAS32 API support. 2013-09-25 06:50:00 -04:00
drrobison 8a4a7e1b1a More tests 2013-09-23 16:32:18 -04:00
drrobison 7dc7547271 Change log 2013-09-23 16:00:40 -04:00
Timothy Wall 4ee5e0efec update changelog 2013-09-21 07:30:14 -04:00
Timothy Wall e79f6e0e04 Merge pull request #266 from brettwooldridge/master
Fix for issue#226 "Convert platform to OSGi"

Verified that new OSGI entries show up in jna-platform.jar.
2013-09-21 04:25:48 -07:00
Brett Wooldridge 9de200502a Build jna-platform jar with OSGi headers. Fix OSGi "Bundle-version" header of core jna.jar to contain full version number, rather
than just ${jna.major} number.
2013-09-20 13:05:07 +09:00
Brett Wooldridge 57197d3cc8 Revert "Build jna-platform jar with OSGi headers. Fix OSGi "Bundle-version" header of core jna.jar to contain full version number, rather"
This reverts commit e4a1158b50.
2013-09-20 13:04:05 +09:00
Brett Wooldridge e4a1158b50 Build jna-platform jar with OSGi headers. Fix OSGi "Bundle-version" header of core jna.jar to contain full version number, rather
than just ${jna.major} number.
2013-09-20 12:55:19 +09:00
drrobison 23a7cbaf11 Provide support for the Windows RAS32 API 2013-09-19 11:52:13 -04:00
Timothy Wall 21765f9a9c fix WinDef.POINT references 2013-09-19 07:13:29 -04:00
Timothy Wall bc0b30fec5 Merge branch 'master' of github.com:twall/jna 2013-09-19 07:10:11 -04:00
Timothy Wall 6883010c0f fix WinDef.POINT references 2013-09-19 07:09:45 -04:00
Timothy Wall 3fc7603da8 remove console output from tests (COM tests still need cleanup and proper assertions) 2013-09-14 15:28:24 -04:00
Tobias 79c3521c94 some extensions to support dispid 2013-08-23 17:01:56 +02:00
Tobias 1d6fa14851 some code improvement and cleaning up 2013-08-23 13:39:53 +02:00
Tobias ddecf09700 some small bug fixes to TLB generating 2013-08-20 15:38:01 +02:00
Tobias e9d3793b61 some changes 2013-08-20 13:58:30 +02:00
Tobias 5ec1f87113 bug trapping code 2013-08-20 11:23:55 +02:00
Tobias Wolf f35fe81b40 some changes to find the bug 2013-08-20 08:18:54 +02:00
Timothy Wall 4d0f5ab5d5 remove DOS line terminators 2013-08-19 18:51:35 -04:00
Timothy Wall 919a31f16e fix incorrectly-named 'byReference' classes to 'ByReference' 2013-08-19 16:56:38 -04:00
Tobias 938ee0ddd8 removal of file 2013-08-19 15:08:34 +02:00
Tobias 4f9260b35e some changes to find issue with JNA 4 2013-08-19 15:07:36 +02:00
Tobias 6e0690aa70 Merge pull request #254 from twall/com-branch
After a while I didn`t got any feedback, therefore I merge the code
2013-08-19 00:35:51 -07:00
Tobias 854165453a some changes
added some unit tests
2013-08-09 14:56:54 +02:00
Tobias 04d74c8ba5 arrays extended and unit test 2013-08-09 10:08:35 +02:00
Tobias 0ddf39c979 added some test 2013-08-08 14:05:15 +02:00
Tobias 842904ad44 removeed all array initialisation code 2013-08-07 13:54:55 +02:00
Tobias 20b582e97b some changes 2013-08-07 11:21:03 +02:00
Tobias 2553a95c95 some changes 2013-08-06 16:28:14 +02:00
Tobias f989080691 removed some warnings 2013-08-06 14:24:22 +02:00
Tobias 02230ef692 some changes 2013-08-06 11:02:24 +02:00
Tobias d8d9c62de1 git shows me changes (old/new) 2013-08-06 10:58:37 +02:00
Tobias c1ac91e00f some changes to jna 4 2013-08-06 10:54:33 +02:00
Tobias 4f1f03346f some changes 2013-08-06 10:52:24 +02:00
Tobias 8c9e2e67ef some changes to support jna 4 2013-08-06 10:24:41 +02:00
Tobias 2c32c5596e changes including update to jna 4.0 2013-08-05 18:12:25 +02:00
Tobias af8c85428d merge commit 2013-08-05 15:48:37 +02:00
Tobias 2bb0ac91d1 some cosmetics 2013-08-05 10:58:49 +02:00
Tobias 8f24f1d82a Update README.md 2013-08-05 10:35:33 +02:00
Tobias 6762c42a18 Update CHANGES.md 2013-08-05 10:32:45 +02:00
Falldog f1903d903c Update CHANGES.md 2013-08-02 23:00:12 +08:00
Tobias 2ee9962838 some changes to TlbImp 2013-08-02 11:15:05 +02:00
Tobias 9f4155a150 some changes 2013-08-01 18:03:00 +02:00
Falldog 44f6e5ab76 Modify the API in Advapi32Util for support registryGetKey() in WOW64 flag 2013-07-31 15:46:47 +08:00
Tobias b10c508a6b some changes 2013-07-30 16:00:19 +02:00
Timothy Wall 70f3c4757f remove superfluous (and problematic) utf8 BOM 2013-07-22 07:19:39 -04:00
Timothy Wall 15b2df4acf enable platform tests to run w/o native build bits 2013-07-22 06:59:34 -04:00
Daniel Doubrovkine (dB.) 3157243deb Merge pull request #249 from Falldog/master
Add registryCloseKey()
2013-07-21 09:33:19 -07:00
Timothy Wall 95526ab823 fix bug if ByValue types are explicitly used in struct fields 2013-07-21 09:03:15 -04:00
falldog cf6b5e4dce Add UnitTest testRegistryGetCloseKey & update CHANGES.md 2013-07-20 09:32:27 +08:00
falldog 4b245b9053 Add registryCloseKey() for close registry key by registryGetKey() 2013-07-19 11:00:26 +08:00
Timothy Wall 923cd5a937 fix javadoc links 2013-07-15 07:03:50 -04:00
Daniel Doubrovkine (dB.) 342afd7221 Fixed JNA platform download link. 2013-07-12 11:52:59 -04:00
Timothy Wall 91a9bd6ab3 remove non-ascii from javadoc 2013-07-06 09:16:27 -04:00
Timothy Wall b980a28c91 bump version 2013-07-04 14:51:52 -04:00
Timothy Wall 9b7ba38dc2 final 4.0 changes 2013-07-04 14:42:30 -04:00
Timothy Wall 08157deece Merge branch 'master' of github.com:twall/jna 2013-07-04 10:24:54 -04:00
Timothy Wall c7e7e2bcdc Update PublishingToMavenCentral.md 2013-07-04 10:24:26 -04:00
Timothy Wall 01ab778621 Update ReleasingJNA.md 2013-07-04 10:09:55 -04:00
Timothy Wall 312de23e5e Merge branch 'master' of github.com:twall/jna 2013-07-04 10:05:09 -04:00
Timothy Wall 792c5374d7 Update ReleasingJNA.md 2013-07-04 10:04:37 -04:00
Timothy Wall 34dea52d6c Update PublishingToMavenCentral.md 2013-07-04 10:02:32 -04:00
Timothy Wall 6f3703d00b fix line termination 2013-07-04 10:00:28 -04:00
Timothy Wall cbd4b46f9f fix paths to jna-platform.jar 2013-07-04 10:00:01 -04:00
Timothy Wall ff1109389c Update PublishingToMavenCentral.md 2013-07-04 09:51:26 -04:00
Timothy Wall c31e9cdebf Update ReleasingJNA.md 2013-07-04 09:48:30 -04:00
Timothy Wall 97449288eb ensure native bits get built for 'native' target and for tests 2013-07-03 07:23:53 -04:00
Timothy Wall 9c2aebcf3c Merge branch 'master' of github.com:twall/jna 2013-07-03 07:21:55 -04:00
Timothy Wall 54c1851db5 speed up callback lookup 2013-07-03 07:21:35 -04:00
Timothy Wall f1d0a9b688 propagate field access permissions to Union 2013-07-02 13:01:06 -04:00
Timothy Wall d62a8abb24 by default, don't build native
make Structure get/setFieldValue protected
2013-06-26 07:27:17 -04:00
Tobias 3f182664be some changes 2013-06-24 18:28:33 +02:00
Daniel Doubrovkine (dB.) 6f362b53c3 Update CHANGES.md 2013-06-23 15:46:47 -06:00
Daniel Doubrovkine (dB.) 617420eaf9 Update CHANGES.md 2013-06-23 15:46:18 -06:00
bsorrentino e0d2079802 Add support of function SHAppBarMessage from ShellApi. 2013-06-23 14:35:58 -07:00
Timothy Wall 897b318324 update win64 natives 2013-06-16 20:30:02 -04:00
Timothy Wall 1737d6addb accommodate long path names, fixes #243 2013-06-16 09:05:26 -04:00
Timothy Wall 418a53806c rename JNA load test 2013-06-15 07:15:42 -04:00
Timothy Wall 79272c76a5 make unpacked path available as a system property, track down JVM error in System.load 2013-06-15 07:05:53 -04:00
Timothy Wall d0936b0189 use jna-platform as id for platform jar 2013-06-13 03:47:31 -04:00
Timothy Wall 8db46b4c1a update freebsd natives 2013-06-13 03:39:54 -04:00
Timothy Wall c6a88f3b7f update openbsd-x86-64 natives 2013-06-13 03:38:30 -04:00
Timothy Wall 2fb4c9b683 add more test coverage 2013-06-11 05:03:32 -04:00
Timothy Wall 766db7a318 fix formatting 2013-06-11 04:52:50 -04:00
Timothy Wall e8d4a3e6c0 Fix varargs tests 2013-06-11 04:50:03 -04:00
Timothy Wall 9ac8de0f5d add some Function tests 2013-06-11 04:36:35 -04:00
Timothy Wall fed3b9f432 check for invalid Structure.ByReference usage 2013-06-11 04:04:47 -04:00
Tobias Wolf 327b429d79 some changes 2013-06-09 20:18:31 +02:00
Tobias Wolf 55cca7220a some changes 2013-06-09 13:09:40 +02:00
Timothy Wall 3e55136c6a add license info files 2013-06-08 09:05:03 -04:00
Timothy Wall 2d7971a429 fix alignment on osx/ppc 2013-06-06 21:49:14 -04:00
Timothy Wall acf06d725f update sunos-x86* natives 2013-06-04 23:45:59 -04:00
Timothy Wall e5dcc56056 update w32ce-arm natives 2013-06-04 23:29:12 -04:00
Timothy Wall ce96234b72 Merge branch 'master' of github.com:twall/jna 2013-06-04 22:59:01 -04:00
Timothy Wall 3b8fe3b011 update android natives 2013-06-04 22:58:38 -04:00
Timothy Wall 82561550e8 update sunos natives 2013-06-05 03:01:36 +02:00
Timothy Wall 631920d41e update darwin natives 2013-06-04 18:25:45 -04:00
Timothy Wall 6021064040 Merge branch 'master' of github.com:twall/jna 2013-06-04 18:16:52 -04:00
Timothy Wall 0547a9c3e2 update linux-arm natives 2013-06-04 18:16:35 -04:00
Timothy Wall a1fe8ce22c update linux-x86 natives 2013-06-04 17:59:20 -04:00
Timothy Wall 5e56b8565a update win64 natives 2013-06-04 08:49:03 -04:00
Timothy Wall 16d4db1790 fix snprintf on windows 2013-06-04 08:44:14 -04:00
Timothy Wall 32442cd2c4 revise last error checking 2013-06-04 03:29:16 -04:00
Timothy Wall 2ac6c86266 Merge branch 'master' of github.com:twall/jna 2013-06-02 18:43:22 -04:00
Timothy Wall 5664101490 fix broken test on XP 2013-06-02 18:42:56 -04:00
Timothy Wall d2dda4abb6 update win32 natives 2013-06-02 18:42:42 -04:00
Timothy Wall 1f878f01f7 Merge branch 'master' of github.com:twall/jna 2013-06-02 19:53:21 +02:00
Timothy Wall bf28737ebd update sparc/v9 natives 2013-06-02 19:52:40 +02:00
Timothy Wall 7fb2c1b041 fix w32 compile error 2013-06-02 13:50:48 -04:00
Timothy Wall 4f3dcfdf4b update docs 2013-06-02 09:18:27 -04:00
Timothy Wall 13b2d7c0c1 Merge branch 'amd64-pthread-cleanup' of github.com:twall/jna 2013-06-02 08:45:33 -04:00
Timothy Wall 2239bdfdfd improve library load debugging 2013-06-02 08:44:32 -04:00
Timothy Wall c6151c3775 ensure native library found in jar 2013-06-02 08:34:03 -04:00
Timothy Wall 0387196f85 fix library load error w/unicode 2013-06-02 14:18:32 +02:00
Timothy Wall c7e7798979 fix amd64 native thread cleanup test 2013-05-30 10:42:09 -04:00
Timothy Wall aa80c8d19f Merge branch 'amd64-pthread-cleanup' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-30 08:03:06 -04:00
Timothy Wall 02d5f47380 Merge branch 'master' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-30 07:42:21 -04:00
Timothy Wall 75f3ed2d5a revise thread termination flag logic 2013-05-30 07:41:24 -04:00
Timothy Wall 4e5afb4940 make 32-bit win32 MSVC comment explicit 2013-05-30 07:09:55 -04:00
Timothy Wall 85793114d4 fix #237, LastErrorException/getLastError thread-safe errno on AIX 2013-05-30 07:00:30 -04:00
Timothy Wall 708e76473a Merge branch 'master' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-30 06:57:43 -04:00
Timothy Wall 2b8773a8f0 fix padding on ppc 2013-05-29 23:55:12 -04:00
Timothy Wall 962ae7998e fix broken test 2013-05-29 23:24:45 -04:00
Timothy Wall 8f199788a5 force gcc to 32-bit mode for i386 builds on amd64 2013-05-29 21:24:43 -04:00
Timothy Wall caaddd1179 add thread termination flags and checking 2013-05-29 20:43:26 -04:00
Timothy Wall 3704b23a71 auto-strip profiler prefix set in jna.profiler.prefix 2013-05-28 22:49:20 -04:00
Timothy Wall c596f9f7d5 add explicit test for direct mapping use of supplied function mapper 2013-05-28 22:18:21 -04:00
Timothy Wall f6208e71f4 Merge branch 'master' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-28 07:00:30 -04:00
Timothy Wall 85a3cda5c8 update win32-x86 natives 2013-05-27 23:09:32 -04:00
Timothy Wall 6c591c38d9 fix failing test on XP 2013-05-27 23:08:18 -04:00
Timothy Wall 15aac21e2b restore gcc as default win32 32-bit build 2013-05-27 22:22:17 -04:00
Timothy Wall e0441a356d fix failing test 2013-05-27 16:20:58 -04:00
Timothy Wall f3da8161aa verify proper module handle for dll callbacks 2013-05-27 16:14:38 -04:00
Timothy Wall 609e3e459b fix dll callbacks inline asm with msvc 2013-05-27 15:11:55 -04:00
Timothy Wall 8638bb57f9 fix 32-bit build under MSVC 10 2013-05-27 07:56:05 -04:00
Timothy Wall d11084ce0d Merge branch 'master' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-27 07:16:08 -04:00
Timothy Wall 1ae335c7da update win64 natives 2013-05-26 17:56:55 -04:00
Timothy Wall 99529821b4 Merge branch 'master' of github.com:twall/jna 2013-05-26 17:52:52 -04:00
Timothy Wall d551e656cb fix win64 compile warnings 2013-05-26 09:57:45 -04:00
Timothy Wall ba49b166fb add test for GetLastError interception 2013-05-26 09:57:28 -04:00
Timothy Wall a3e002c1db fix w32 test 2013-05-26 09:20:32 -04:00
Timothy Wall 02601e4f7c Merge branch 'master' of github.com:twall/jna 2013-05-25 20:23:51 -04:00
Timothy Wall e2349e4bf6 expand test coverage 2013-05-25 20:11:43 -04:00
Timothy Wall 87afaf44f7 fix javadoc warnings 2013-05-25 19:29:26 -04:00
Timothy Wall bb913b171d add missing methods on opaque pointer
fix NPE
2013-05-25 19:07:07 -04:00
Daniel Doubrovkine (dB.) 975063a28f Fixed links, consistent tense. 2013-05-25 14:29:03 -03:00
Daniel Doubrovkine 8e44c82096 Merged from master. 2013-05-25 13:17:17 -04:00
Daniel Doubrovkine (dB.) 7a33f0b43e Added a note on \r. 2013-05-25 13:53:53 -03:00
Daniel Doubrovkine (dB.) cfdf20f4b7 Clarified Win64 64-bit builds. 2013-05-25 13:48:22 -03:00
Timothy Wall 13207caab6 update clover 2013-05-24 23:31:37 -04:00
Timothy Wall 980b86e2c5 fix test 2013-05-24 23:31:20 -04:00
Timothy Wall c6afe5f73d check for options caching 2013-05-24 08:17:57 -04:00
Timothy Wall 5c48942bda clean up synchronization around options loading 2013-05-24 00:08:57 -04:00
Timothy Wall 82c032329a Merge pull request #234 from dblock/eclipse-build
Fix: Eclipse project build.
2013-05-23 15:06:57 -07:00
Timothy Wall 2a2bdbe60c merge from upstream 2013-05-22 22:36:55 -04:00
Timothy Wall 9414757638 update linux-arm natives 2013-05-22 22:29:56 -04:00
Timothy Wall 253dc5abae work around linux-arm class incompatibility bug in StructureTest 2013-05-22 22:27:56 -04:00
Timothy Wall 296185c0ba fix FP callback args on ARM 2013-05-22 21:12:56 -04:00
Daniel Doubrovkine 70cff3e17a Fix: Eclipse project build. 2013-05-22 18:02:54 -04:00
Timothy Wall 78969b8050 avoid static field initialization bug 2013-05-21 15:19:13 -04:00
Timothy Wall d90f6e3346 fix typo 2013-05-21 14:02:48 -04:00
Timothy Wall 8f99db35dd fix struct padding test on linux-arm 2013-05-21 13:45:38 -04:00
Timothy Wall b5759955d5 bump versions 2013-05-21 13:26:40 -04:00
Timothy Wall adafa3b2c4 last error now always preserved 2013-05-20 23:33:24 -04:00
Timothy Wall 979f43da07 more cleanup 2013-05-20 23:28:06 -04:00
Timothy Wall 528036e9e3 remove inadvertently added files 2013-05-20 23:20:47 -04:00
Timothy Wall 39aebf1d0b fix WORDByReference definition 2013-05-20 19:59:42 -04:00
Timothy Wall 45df2eb8f5 correct test to fix failure 2013-05-20 19:55:03 -04:00
Tobias Wolf 7ae490a393 make parameter reverse ordering as expected by COM runtime 2013-05-20 12:13:42 +02:00
Tobias Wolf 4c114f7796 added sample for MSWord SaveAs function 2013-05-20 10:49:46 +02:00
Timothy Wall 92aa443023 fix file mods 2013-05-19 22:54:56 -04:00
Timothy Wall 1492546150 revise string encoding 2013-05-19 22:53:38 -04:00
Timothy Wall 95c7be884f clean up platform tests and error handling on windows 2013-05-18 12:39:27 -04:00
Timothy Wall 00acbd664e fix javadoc warning 2013-05-17 13:56:49 -04:00
Timothy Wall e7b4a2d5ec add CoInit constants
fix last error formatting
2013-05-17 13:41:03 -04:00
Timothy Wall d7448ad16c remove dummy files 2013-05-16 23:04:11 -07:00
Timothy Wall 7d8afba0f4 clean up some platform win32 junk 2013-05-16 23:03:28 -07:00
Timothy Wall 0f1bdc87d4 enable android-x86 cross-builds 2013-05-16 23:01:14 -07:00
Timothy Wall d4ed7ea34f remove superfluous Structure.ByReference usage 2013-05-15 10:05:07 -04:00
Timothy Wall daf8d5ef89 fix up VM arch flags 2013-05-15 10:04:40 -04:00
Timothy Wall 3ba1fd0975 update openbsd-x86 natives 2013-05-14 03:00:06 -04:00
Timothy Wall a3cdb5a90d leave test file behind on failure 2013-05-14 02:59:24 -04:00
Timothy Wall c6c99b8b98 abstract option for default encoding for library names 2013-06-13 03:14:17 -04:00
Timothy Wall fffe7926da replace generic bsd handling 2013-06-13 03:01:27 -04:00
Timothy Wall 285e5305cb remove generic bsd placeholders 2013-06-13 02:49:33 -04:00
Timothy Wall b9fa73ce7a add bsd targets 2013-06-13 02:48:26 -04:00
Timothy Wall d5669d2ae4 fix javadoc warnings 2013-06-13 02:23:31 -04:00
Timothy Wall 3db7fc10ec rename platform.jar to jna-platform.jar 2013-06-13 02:23:18 -04:00
Timothy Wall 7a0ec5b1df fix vm arch property def 2013-05-13 23:37:16 -04:00
Timothy Wall 8e99313ea4 update changelog 2013-05-13 08:42:10 -04:00
Timothy Wall 8e8aba6ffb getContextClassLoader() may return null 2013-05-13 08:32:15 -04:00
Timothy Wall f903aa926d use a single build directory, multiple build/native-(prefix) directories 2013-05-13 08:01:14 -04:00
Timothy Wall 3848e55813 update license information 2013-05-12 09:18:48 -04:00
Timothy Wall 55778824f3 Merge branch 'master' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-12 09:03:59 -04:00
Timothy Wall 5b240371d9 Merge branch 'master' of github.com:twall/jna 2013-05-12 00:05:30 -04:00
Timothy Wall d65432a014 update w32 natives
fix stdcall stack in libffi
auto-update version resource
2013-05-11 23:55:54 -04:00
Timothy Wall 107d7fa43e report correct javaws error on win64 2013-05-11 21:44:11 -04:00
Timothy Wall bf19830d66 fix padding for windows 2013-05-11 19:16:16 -04:00
Timothy Wall 090b248708 update linux/x86 natives 2013-05-11 15:33:51 -04:00
Timothy Wall e5855c2fa1 fix web start test timeout 2013-05-11 15:33:37 -04:00
Timothy Wall 064785b985 Merge branch 'master' of github.com:twall/jna 2013-05-11 12:21:03 -04:00
Timothy Wall 757446c64e update android natives 2013-05-11 12:20:55 -04:00
Timothy Wall 14e69d1501 update solaris/x86 natives 2013-05-11 12:19:13 -04:00
Timothy Wall 874caccc53 make arch handling more consistent; don't load Native class from Platform 2013-05-11 12:15:39 -04:00
Timothy Wall 295aaa4c31 work around solaris/x86 JVM bug 2013-05-11 11:49:28 -04:00
Timothy Wall dbd45ddf90 update osx natives 2013-05-11 09:27:02 -04:00
Timothy Wall 2f2289c9df Merge branch 'master' of github.com:twall/jna 2013-05-11 15:15:53 +02:00
Timothy Wall 9b7dddfe0c update sunos natives, fix struct padding test expected results 2013-05-11 15:15:18 +02:00
Timothy Wall 21a468a125 consolidate BSD targets test 2013-05-11 01:14:39 -04:00
Timothy Wall de82d964ca update bsd64 native 2013-05-10 20:57:30 -04:00
Timothy Wall d843968432 consolidate BSD targets 2013-05-10 20:54:57 -04:00
Timothy Wall f4958ee8f9 fix broken callback test on BSD 2013-05-10 20:53:02 -04:00
twalljava@java.net 1ed65484e0 fix test on 32-bit 2013-05-10 17:10:25 -04:00
Timothy Wall 8c1e1c2d2e remove invalid character from javadoc 2013-05-10 08:44:38 -04:00
Timothy Wall c888d6e86a fix README typos 2013-05-10 08:32:03 -04:00
Timothy Wall a9ef0e6aca use current java version for compatibility if less than 1.6 2013-05-10 08:24:16 -04:00
Timothy Wall 35b409dce8 Merge branch 'master' of github.com:twall/jna 2013-05-10 08:03:01 -04:00
Timothy Wall 16f3f9310e fix javadoc warning 2013-05-10 08:02:33 -04:00
Timothy Wall 5206982e48 add ASL
set compatibility to 1.6 by default
tweak CreateProcessW definition
avoid unicode errors in username on win32 (temp files)
2013-05-10 08:00:53 -04:00
Timothy Wall 8e9e3b45b6 add symlink creation timeout 2013-05-09 09:14:19 -04:00
Timothy Wall f96eddc6ca update android native 2013-05-08 23:55:27 -04:00
Timothy Wall b2dc918313 update osx natives 2013-05-08 08:01:23 -04:00
Timothy Wall d511e9f0e5 update win32 native 2013-05-08 07:46:36 -04:00
Timothy Wall ed93f9833e Merge branch 'master' of github.com:twall/jna 2013-05-08 07:21:29 -04:00
Timothy Wall 4b34601dc3 update win64 nattttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttive 2013-05-08 07:17:23 -04:00
Timothy Wall c7142dc82c update sparc natives 2013-05-08 13:09:45 +02:00
Timothy Wall 9914826b57 fix line terminators 2013-05-07 08:37:20 -04:00
Trejkaz d2159d70e3 Fixing compilation issues in Kernel32UtilTest 2013-05-07 20:41:20 +10:00
Trejkaz 6a06656c16 Merge branch 'master' of https://github.com/twall/jna
Pulling master back to get compilation fixes.
2013-05-07 20:39:27 +10:00
Timothy Wall b1aa24d911 add test for loading from path with unicode characters (fails on XP, at least) 2013-05-06 09:04:02 -04:00
Timothy Wall 198cb1f9df fix file permissions 2013-05-06 08:25:36 -04:00
Timothy Wall 3fa90d76f5 update linux amd64 natives 2013-05-04 11:51:59 -04:00
Timothy Wall bfea982d45 update linux-x86-64 natives 2013-05-04 11:46:43 -04:00
Timothy Wall 78d70e760e update linux-x86 natives 2013-06-02 13:35:36 -04:00
Timothy Wall 4b9632c4ee update linux/amd64 natives 2013-05-04 11:43:17 -04:00
Timothy Wall 6c9708070c update linux/x86 natives 2013-05-11 01:32:46 -04:00
Timothy Wall b7a299f42a amd64/linux pthread investigations 2013-05-04 11:38:12 -04:00
Timothy Wall e35977776d symlink creation now broken on osx 10.8.3 2013-05-01 15:29:50 -04:00
Timothy Wall 25d1b110a3 Merge branch 'master' of github.com:twall/jna 2013-05-01 00:12:04 -04:00
Timothy Wall 38b796a516 fix #223, union sizing/layout issue 2013-05-01 00:11:19 -04:00
Trejkaz 136653a644 GetLogicalProcessorInformation and associated structs 2013-05-01 13:24:31 +10:00
Timothy Wall 1af1000139 Add prominent links for mailing list and stackoverflow 2013-04-30 07:41:56 -03:00
Timothy Wall 5db3b42770 consolidate compiler pragmas 2013-04-25 08:22:37 -04:00
Timothy Wall 6b552cc03d fix framework loading on OSX 2013-04-25 08:22:16 -04:00
Timothy Wall 19d7775e91 windows won't load libraries w/truncated name 2013-04-24 08:33:53 -04:00
Timothy Wall 299b0a9517 catch attempts to run 64-bit tests on 32-bit javaws 2013-04-24 08:11:49 -04:00
Timothy Wall 075efa649d use a different error code on windows, fixes broken test 2013-04-24 06:57:16 -04:00
Timothy Wall b4f0f21421 fixes for oracle openjdk 2013-04-22 08:48:27 -04:00
Timothy Wall dbeda7f67d fix some tests under clover 2013-04-21 22:37:47 -04:00
Timothy Wall ea56252d2f fix javadoc warnings 2013-04-21 09:46:56 -04:00
Timothy Wall 8d376755dc clean up some function naming
fix typo
2013-04-21 09:39:10 -04:00
Timothy Wall 5d8243ec3b revise resource extraction to use explicit class loaders 2013-04-21 09:33:05 -04:00
Timothy Wall 85e962c124 fix #218 2013-04-17 21:02:53 -04:00
Timothy Wall 97403354a2 add tests for library loading from resource path 2013-04-17 20:53:09 -04:00
Timothy Wall 605dfcbd33 update CHANGES.md 2013-04-17 07:32:04 -04:00
Timothy Wall 3f6441c420 Merge branch 'master' of github.com:twall/jna 2013-04-17 07:29:12 -04:00
Timothy Wall 885586188c clean up platform test runner, run on all platforms 2013-04-17 07:28:28 -04:00
Timothy Wall a517ca68e9 fix libjsig path 2013-04-16 19:39:58 -04:00
Tobias 4f84e1b325 some changes for typelib 2013-04-15 17:50:13 +02:00
Timothy Wall 5857cf7c49 fix load/unload tests 2013-04-14 22:06:38 -04:00
Timothy Wall 52bec37a5b remove extraneous endif 2013-04-14 10:33:02 -04:00
Timothy Wall 48b584d979 reinstate option for xcode 4 only 2013-04-14 10:30:13 -04:00
Dan Rollo 6d2658d888 Revert back to 'failifexecutionfails' for git call. 2013-04-11 03:32:16 -04:00
Dan Rollo 48df3d3cd2 Try 'searchpath' in clean-exec target on OSX. 2013-04-11 03:20:35 -04:00
Dan Rollo d58add66d4 Fix compile error on MacOSX introduced in a676e3acaa. 2013-04-11 01:40:44 -04:00
Timothy Wall 5ac33562cf trim some fat 2013-04-10 07:28:14 -04:00
Timothy Wall 483223546b update from libffi 3.0.13 2013-04-10 07:24:45 -04:00
Dan Rollo 3a795a4483 add 'failifexecutionfails' to ignore problems reverting version stamped files. Was causing build problem on OSX build agent. 2013-04-10 00:21:57 -04:00
Timothy Wall 3e0ee7eced always create errno, detach TLS 2013-04-09 06:20:20 -04:00
Timothy Wall 721a080af9 clean up nounpack handling 2013-04-09 05:57:06 -04:00
Timothy Wall e8dd1564d5 tweak build notes 2013-04-09 05:21:19 -04:00
Timothy Wall 6b923bcf0c avoid superfluous rebuilds on windows, fix md5 checksum with newer ant 2013-04-09 05:19:46 -04:00
Timothy Wall 889d2bbb11 avoid spurious rebuilds 2013-04-09 04:55:06 -04:00
Timothy Wall d53bbd32a9 fix win32 build 2013-04-09 04:08:33 -04:00
Timothy Wall 467ab4ec17 reapply changes 2013-04-08 16:44:50 -04:00
Timothy Wall 900a68eb63 Merge pull request #213 from tomohiron/fix_dump_memory
fix dump memory problem
2013-04-08 13:44:14 -07:00
Timothy Wall 638135f309 pre-merge 2013-04-08 16:43:47 -04:00
Timothy Wall 3a94cbf242 pre-merge 2013-04-08 16:42:43 -04:00
Timothy Wall 8326d791bf fix web start deployment path under oracle 2013-04-08 16:36:57 -04:00
Timothy Wall a676e3acaa fix building under newer xcode, fix compiler warning 2013-04-08 16:32:29 -04:00
Timothy Wall 8a5265c1dd invalidate native jars 2013-04-08 09:58:25 -04:00
Timothy Wall cab106167c update CHANGES.md 2013-04-08 09:57:55 -04:00
Timothy Wall 6fc42f59e1 use tls for callback detach indication, avoid potential conflict with last error 2013-04-08 09:56:42 -04:00
Timothy Wall d0995f3bc2 update natives 2013-04-08 08:00:19 -04:00
Timothy Wall 8ed4def1f3 Merge branch 'master' of github.com:twall/jna 2013-04-08 01:37:48 +02:00
Timothy Wall bf0ab0ea55 update natives 2013-04-08 01:34:57 +02:00
Timothy Wall d4a33cbc58 update native 2013-04-07 19:31:51 -04:00
tomohiro 18cd75b130 modified CHANGES.md 2013-04-08 04:40:38 +09:00
Timothy Wall 4b2c411a2e reorganize tests, ensure by value arguments always use their own memory 2013-04-07 10:09:58 -04:00
tomohiro b33ac764b4 fix Structure.toString because it dumped memory when jna.dump_memory was false 2013-04-07 14:23:23 +09:00
Timothy Wall 0edd935144 fix direct buffer args tests 2013-04-06 18:09:47 -04:00
Timothy Wall 839be7862e use snapshot versions for maven 2013-04-06 17:19:59 -04:00
Timothy Wall 3cfb7df151 enable canonical processor designations on other platforms 2013-04-06 17:19:14 -04:00
Timothy Wall 3364dfcc2a fix compiler warnings on win64 2013-04-06 17:18:50 -04:00
Timothy Wall 818f7fa5d6 obsolete native libs 2013-04-06 17:15:27 -04:00
Timothy Wall 8bb128062a Merge pull request #212 from twall/native-struct-ptr-creation
Native struct ptr creation
2013-04-06 13:23:03 -07:00
Timothy Wall f576184c13 Merge branch 'master' of github.com:twall/jna into native-struct-ptr-creation 2013-04-06 16:14:19 -04:00
Timothy Wall 7d57612d7d Merge pull request #211 from twall/improved_last_error
Improved last error
2013-04-06 13:12:09 -07:00
Timothy Wall c94e9ff4b7 reset read flag when base pointer is altered 2013-04-06 09:40:58 -04:00
Timothy Wall 0a8a67ca5f Merge branch 'improved_last_error' of github.com:twall/jna into native-struct-ptr-creation 2013-04-06 09:36:48 -04:00
Timothy Wall dac9dc4742 Merge branch 'improved_last_error' of github.com:twall/jna into native-struct-ptr-creation 2013-04-06 09:35:07 -04:00
Timothy Wall bf91b32d25 rename with consistent processor names 2013-04-06 09:33:33 -04:00
Timothy Wall 16e6031999 use consistent processor arch names, bump version number 2013-04-06 09:30:13 -04:00
Timothy Wall a4ee620aaf merge from upstream 2013-04-06 08:49:44 -04:00
Timothy Wall 2c18ec2b75 update links 2013-04-06 07:24:18 -04:00
Timothy Wall f0080de225 prepare for release 2013-04-06 06:51:55 -04:00
Timothy Wall e176d09eac distinguish PRs from issues 2013-04-06 06:28:17 -04:00
Timothy Wall 9ff14b0a90 distinguish PRs from issues 2013-04-06 06:27:38 -04:00
Timothy Wall 1b234b6c3b remove non-ascii character 2013-04-06 06:25:19 -04:00
Timothy Wall 84cfea1ac0 make resource prefix available via Platform 2013-04-06 06:14:18 -04:00
Timothy Wall 85d8d08972 update docs 2013-04-06 06:07:54 -04:00
Timothy Wall 5cf120de75 Merge pull request #210 from bertfrees/24f60158d4bf25c3fa57f53ae2ba6fb0c80a1637
OSGi fix for Mac OS X
2013-04-06 02:39:49 -07:00
Timothy Wall bdf38eaf8e fix compile error 2013-04-05 07:28:22 -04:00
Timothy Wall 3823533c17 add support for loading native libraries from classpath (FS or jar) 2013-04-05 05:13:53 -04:00
Timothy Wall fecaf92ec1 auto-generate copyright year 2013-04-05 02:14:06 -04:00
Tobias d7ed79ea07 some changes for typelib parsing 2013-04-04 17:42:45 +02:00
Timothy Wall 830dc666ad avoid NPE 2013-04-04 06:50:30 -04:00
Tobias 68010b6752 some changes 2013-04-03 18:17:38 +02:00
Timothy Wall b7951759ec avoid having to edit/commit file to toggle between maven modes 2013-04-03 05:30:03 -04:00
Timothy Wall ead2c70a1a avoid inadvertent AWT library load 2013-04-03 05:29:22 -04:00
Timothy Wall e0016e875f avoid inadvertent AWT library load 2013-04-03 05:21:05 -04:00
Tobias d74598979a some changes 2013-04-02 18:02:02 +02:00
Bert Frees 24f60158d4 OSGi fix for Max OS X 2013-04-01 21:34:58 +02:00
Timothy Wall 910642248d add OSX framework search options 2013-03-30 08:11:06 -04:00
Timothy Wall b26402bd57 use ptr-based structure creation 2013-03-30 07:58:14 -04:00
Tobias 6166a169e3 some changes 2013-03-27 17:13:02 +01:00
Timothy Wall bf1579a5dc use distinct maps for direct vs non-direct callbacks (performance) 2013-03-26 21:58:22 -04:00
Tobias 2a51bbfba5 some changes 2013-03-26 17:44:10 +01:00
Timothy Wall d8e8889d92 improve performance saving last error (per thread) 2013-03-26 11:28:27 -04:00
Timothy Wall 6fdb21414d fix #206 2013-03-24 19:44:07 -04:00
Timothy Wall 6178c5c6a0 Merge branch 'master' of github.com:twall/jna 2013-03-24 19:41:25 -04:00
Timothy Wall e7b0c5d05d tweak javadoc dependency for platform target 2013-03-24 18:52:46 -04:00
Timothy Wall 1140b4eed2 fix typo 2013-03-24 14:09:57 -03:00
Timothy Wall 99613775b1 Merge pull request #204 from twall/optimized-struct-init
Avoid superfluous memory allocation when Structure base address provided...
2013-03-24 09:59:59 -07:00
Timothy Wall 13c1a17018 Merge branch 'master' of github.com:twall/jna 2013-03-22 10:39:11 -04:00
Timothy Wall e51a82e19d Fix Carbon library declaration 2013-03-22 10:38:44 -04:00
Timothy Wall 5180a7e092 fix JNI containing classname in performance test 2013-03-22 10:38:08 -04:00
Tobias d56c74724c some changes to typelib parsing 2013-03-22 10:30:27 +01:00
Tobias 27e9f0f005 some changes to typelib parsing 2013-03-20 18:05:31 +01:00
Tobias 832845535a some minor changes 2013-03-20 17:00:01 +01:00
Tobias fcf1f5c283 restored because of lost source code 2013-03-19 17:21:29 +01:00
Tobias 47d1f3cc89 some changes 2013-03-19 14:46:40 +01:00
Tobias 58b89ebc55 some changes 2013-03-19 13:04:35 +01:00
Dan Rollo a2bfccb15b Merge pull request #207 from bhamail/master
remove obsolete comments now that empty Structures are defined as invalid
2013-03-18 20:28:22 -07:00
Dan Rollo 7904663f14 remove obsolete comments now that empty Structures are defined as invalid and test for by StructureTest class. 2013-03-18 23:24:07 -04:00
Tobias bbc1d4b432 some changes regarding typelib 2013-03-18 17:11:20 +01:00
Anthony Green f22ab3c687 Merge branch 'master' of github.com:/atgreen/libffi 2013-03-17 18:37:50 -04:00
Anthony Green 12b1886d7b cygwin fix & updates for 3.0.13 2013-03-17 18:33:59 -04:00
Anthony Green d08124bedf cygwin fix & updates for 3.0.13 2013-03-17 18:32:12 -04:00
Anthony Green cb32c812d0 Fix lib install dir 2013-03-17 09:27:55 -04:00
Timothy Wall 69fbc85665 make conditional read perform auto-read 2013-03-16 10:51:39 -04:00
Timothy Wall 65a246f39b merge from upstream 2013-03-16 10:06:40 -04:00
Timothy Wall 0d9bd6d96b add explicit tests for empty structs and structs with only private fields 2013-03-16 09:56:00 -04:00
Anthony Green efd7866a36 2.0.13rc1 2013-03-16 08:35:57 -04:00
Anthony Green ff647ad4df Merge branch 'master' of github.com:/atgreen/libffi
Conflicts:
	ChangeLog
2013-03-16 08:20:40 -04:00
Anthony Green 4acf0056f5 Build fix for soft-float power targets 2013-03-16 08:18:45 -04:00
Anthony Green 675c983922 Documentation fix 2013-03-16 08:12:38 -04:00
Anthony Green 8a286f570c Fix for m68000 systems 2013-03-16 08:12:19 -04:00
Anthony Green d9dd417b09 Fix for m68000 systems 2013-03-16 08:01:19 -04:00
Anthony Green 215763d012 Update configury. 2013-03-16 07:57:35 -04:00
Anthony Green 9180d8f39c Merge branch 'master' of github.com:/atgreen/libffi 2013-03-16 07:46:55 -04:00
Anthony Green 2fb527a017 Add Meta processor support 2013-03-16 07:46:38 -04:00
Anthony Green 211a9ebf4d Merge pull request #32 from alex/patch-1
Fix for a crasher due to misaligned stack on x86-32.
2013-03-16 07:28:20 -04:00
Anthony Green 7e1b32649e Merge pull request #32 from alex/patch-1
Fix for a crasher due to misaligned stack on x86-32.
2013-03-16 04:24:40 -07:00
Timothy Wall ed58f42176 restore deleted files 2013-03-15 18:42:48 -04:00
Tobias e00752087b some changes 2013-03-15 16:44:07 +01:00
Tobias 626bf14b2d Merge pull request #205 from twall/com-branch
some changes regarding COM and Variant support
2013-03-15 03:48:19 -07:00
Timothy Wall 683e7351f0 fix contrib reference to deprecated method 2013-03-15 06:46:23 -04:00
Tobias 5242a7d826 some changes 2013-03-15 11:36:53 +01:00
Alex Gaynor ee18766b16 Fix for a crasher due to misaligned stack on x86-32.
Full information on reproduction (using Python's ctypes available here: http://bugs.python.org/issue17423)
2013-03-14 15:00:33 -07:00
Timothy Wall f3a384f011 Merge branch 'master' of github.com:twall/jna into optimized-struct-init 2013-03-14 16:35:38 -04:00
Timothy Wall 5267a6ddde add javadoc dependency to platform.jar 2013-03-14 13:56:25 -04:00
Timothy Wall a9f757f39c Merge branch 'master' of github.com:twall/jna into optimized-struct-init 2013-03-14 13:52:41 -04:00
Timothy Wall af1ef9330f fix javadoc errors/warnings 2013-03-14 13:51:58 -04:00
Timothy Wall cf58970bdf remove deprecated methods 2013-03-14 13:39:42 -04:00
Timothy Wall 4595abcebe Merge branch 'master' of github.com:twall/jna 2013-03-14 13:31:37 -04:00
Tobias 4b73c277fa Merge pull request #200 from wolftobias/master
some changes for the Variant date structure
2013-03-14 07:01:23 -07:00
Tobias 9f80a92973 Merge remote-tracking branch 'upstream/master'
Conflicts:
	contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java
	contrib/platform/src/com/sun/jna/platform/win32/OleAuto.java
2013-03-14 14:56:55 +01:00
Dan Rollo b4091b4f45 fix SNAPSHOT publish doc typo 2013-03-08 16:24:08 -05:00
Dan Rollo cb714b9f8b Merge pull request #202 from bhamail/master
Add Publish SNAPSHOT docs
2013-03-08 12:23:09 -08:00
Dan Rollo 0769a8e597 fix typo 2013-03-08 15:21:42 -05:00
Dan Rollo 846cbb3c96 fix typo 2013-03-08 15:20:55 -05:00
Dan Rollo e6d7829ca2 doc format fix 2013-03-08 15:19:23 -05:00
Dan Rollo 404cf22380 doc format fix 2013-03-08 15:17:33 -05:00
Dan Rollo 6c75db5003 add notes on how to publish development SNAPSHOT for pre-release testing. 2013-03-08 15:16:01 -05:00
Tobias 71a8ecfd27 Merge pull request #201 from wolftobias/jnaCOM
Merge the new jnaCOM branch with the master branch to bring the new COM feature to live with the main jna code tree.
2013-03-07 05:25:55 -08:00
Tobias 2582708b2f some fixed and extension for Variant date 2013-03-07 14:14:44 +01:00
Tobias 5587a8fadc fix to VARIANT class 2013-03-07 13:30:09 +01:00
Tobias 22cb28ec50 Update FrequentlyAskedQuestions.md 2013-03-07 13:05:53 +01:00
Timothy Wall c4d9966709 don't check structure memory allocation on direct mappings (yet) 2013-03-03 16:40:31 -05:00
Timothy Wall c69d03a74b more Structure(Pointer) implementations and tests 2013-03-03 10:03:47 -05:00
Timothy Wall 38643d974b update more Structure.newInstance calls 2013-03-02 20:58:38 -05:00
Timothy Wall 00308279df update change log 2013-03-02 14:15:16 -05:00
Timothy Wall 896f4b8b85 used optimized structure+pointer ctor when possible 2013-03-02 12:43:14 -05:00
Timothy Wall ae1bafb39b remove deprecated methods 2013-03-02 12:41:45 -05:00
Daniel Doubrovkine (dB.) 3e2e7ffec7 Merge pull request #197 from headcrashing/WindowMessages
Destroying temporarily created HWND after test
2013-02-24 06:59:08 -08:00
Head Crashing Informatics 46bc91fc63 Destroying temporarily created HWND after test
To demonstrate prevention of resource leaking, this code utilizes the try-finally idiom to destroy tempoarily created HWND even in case of any exceptions or failed assertions.
2013-02-23 18:55:21 +01:00
Daniel Doubrovkine (dB.) fb9e4c6262 Merge pull request #196 from headcrashing/WindowMessages
RegisterWindowMessage
2013-02-23 06:52:02 -08:00
Markus KARG aa043c73e7 Fixed PR number in CHANGES.md 2013-02-23 15:46:43 +01:00
Daniel Doubrovkine (dB.) 68ed3e521e Merge pull request #194 from headcrashing/CLSIDFromProgID
Clsid from prog
2013-02-23 06:37:01 -08:00
Markus KARG b6b3a51d32 Added line to CHANGES.md for this pull request. 2013-02-23 15:31:35 +01:00
Markus KARG 7573196742 Merge branch 'master' of https://github.com/twall/jna into CLSIDFromProgID 2013-02-23 15:27:47 +01:00
Markus KARG b2e16a0ca5 Added info to CHANGES.md about this pull request. 2013-02-23 14:50:20 +01:00
Markus KARG 53809b3c38 Merge branch 'master' of https://github.com/twall/jna into WindowMessages 2013-02-23 14:42:43 +01:00
Daniel Doubrovkine (dB.) 2549728a97 Update CHANGES.md 2013-02-22 14:18:42 -05:00
Daniel Doubrovkine (dB.) 06fde953b1 Merge pull request #192 from headcrashing/master
New Windows Shell API mapping: SHGetSpecialFolderPath
2013-02-22 11:15:40 -08:00
Markus KARG 21b9287cfd Added feature line in CHANGES.md for this pull request. 2013-02-22 19:33:50 +01:00
Markus KARG eeeed87239 Test for CLSIDFromProgID 2013-02-22 17:11:54 +01:00
Markus KARG 97e50d7a35 Mapped RegisterWindowMessage of User32.dll, added User32Util
which wraps registerWindowMessage, createWindow and createWindowEx.
2013-02-22 16:37:58 +01:00
Markus KARG f0195711b5 Mapped GetPrivateProfileString, GetPrivateProfileInt and
WritePrivateProfileString of Kernel32.dll
2013-02-22 15:02:25 +01:00
Markus KARG 68ba4117f6 Mapped SHGetSpecialFolderPath of Shell32.dll 2013-02-21 22:19:39 +01:00
Timothy Wall dbd584d305 skip javah target on skip-native 2013-02-18 12:52:27 -05:00
Anthony Green f308faf1ea Add moxie support. Release 3.0.12. 2013-02-11 14:25:13 -05:00
Anthony Green 4ea22e54e3 Update README 2013-02-10 08:48:38 -05:00
Anthony Green 10e77227b6 mend 2013-02-10 08:47:26 -05:00
Tobias e69d7fa485 some changes 2013-02-09 16:57:35 +01:00
Anthony Green a9521411a5 sparc v8 and testsuite fixes 2013-02-09 06:54:40 -05:00
Anthony Green 70b11b47ee Fix small struct passing on ppc 2013-02-08 16:12:19 -05:00
Anthony Green 63ba1fa79f Remove xfail for arm*-*-*. 2013-02-08 15:18:19 -05:00
Anthony Green 24fbca4c1d Fix typo 2013-02-08 14:19:56 -05:00
Anthony Green b0fa11cb0a More man page cleanup 2013-02-08 14:17:13 -05:00
Anthony Green 8bd15d139a Fix many.c testcase for ppc 2013-02-08 13:56:37 -05:00
Anthony Green 7aab825cf1 Add missing files to dist 2013-02-08 13:26:21 -05:00
Anthony Green cb03ea8f4e sparc v9 fixes for sun tools 2013-02-08 12:25:18 -05:00
Anthony Green 35ee8d44f3 Fix microblaze big-endian struct issue 2013-02-08 07:12:41 -05:00
Anthony Green 9db7e1a958 Fix botched sparc patch. Update version. 2013-02-07 21:06:08 -05:00
Timothy Wall cdb4797fa3 move IUnknownTest to its rightful place (w/rename) 2013-02-07 20:39:24 -05:00
Timothy Wall bd4207dfa4 fix compilation error 2013-02-07 20:32:30 -05:00
Timothy Wall c9493636a9 fix some compilation errors/warnings 2013-02-07 20:29:13 -05:00
Anthony Green ce0138e614 Update bug report address. rc2. 2013-02-07 18:04:01 -05:00
Anthony Green fd07c9e404 Add cache flushing routine for sun compiler on sparc solaris 2.8 2013-02-07 18:00:36 -05:00
Anthony Green ed6ae9501b Add libtool-ldflags. Define toolexeclibdir for non-GCC builds. 2013-02-07 16:43:36 -05:00
Anthony Green ffef2e046a x32 and libtool fixes 2013-02-07 15:47:01 -05:00
Anthony Green 95eecebb28 Remove a.out cruft from dist 2013-02-07 15:32:46 -05:00
Anthony Green 176aa9d2e2 Fix GCC usage test and update README 2013-02-07 15:29:22 -05:00
Anthony Green f3a4f3fdde Fixes for AIX xlc compiler. 2013-02-07 09:57:20 -05:00
Tobias e6d76b9bc8 some util changes 2013-02-07 14:00:58 +01:00
Timothy Wall 49868b8203 use SIZE_T size for size_t 2013-02-07 07:00:00 -05:00
Anthony Green 522f8fef49 Fix man page. Clean out junk. 2013-02-06 20:31:31 -05:00
Anthony Green c4dfa259eb Bump soversion 2013-02-06 17:43:24 -05:00
Anthony Green f62bd63fe6 Release candidate 1 2013-02-06 17:38:32 -05:00
Anthony Green f7cd61e9e6 Fix pkgconfig install bits 2013-02-06 17:38:04 -05:00
Anthony Green 6a79012942 Work around LLVM ABI problem on x86-64 2013-02-06 17:37:15 -05:00
Tobias 528e1bcbe9 some changes 2013-02-06 18:03:09 +01:00
Timothy Wall f0fd47dbdb Merge pull request #185 from wolftobias/master
New implementation to support COM
2013-02-05 18:01:25 -08:00
Timothy Wall e1c2632941 Merge pull request #190 from wolftobias/patch-2
Update www/PlatformLibrary.md
2013-02-05 18:00:57 -08:00
Tobias Wolf ef19ab440b some changes 2013-02-05 22:28:25 +01:00
Tobias 75bb17e11f Update www/PlatformLibrary.md 2013-02-05 11:31:50 +01:00
Tobias 2c2f4bee15 typlib utils 2013-02-05 10:16:39 +01:00
Tobias Wolf 58696f0c2c some changes 2013-02-04 07:05:05 +01:00
Tobias 4130e11693 some changes 2013-02-01 15:28:37 +01:00
Tobias 19de232dd2 some changes 2013-01-31 17:20:37 +01:00
Tobias afb3fb6ab1 some changes 2013-01-30 17:50:36 +01:00
Tobias Wolf 4dda1bcdd1 some changes for typelib parsing 2013-01-29 19:52:40 +01:00
Tobias Wolf c665f2ccb9 some changes 2013-01-27 20:02:17 +01:00
Anthony Green 370112938e Merge pull request #28 from jralls/master
Reorder x86_64 checks
2013-01-27 05:09:04 -08:00
John Ralls bcc0c28001 Reorder x86_64 tests
So that darwin and cygwin/mingw are tested before the generic check --
which allows them to actually be set.
2013-01-26 15:26:01 -08:00
Timothy Wall 1f01a50e09 update javadoc 2013-01-26 07:57:06 -05:00
Timothy Wall 9cc0ce3148 fix string field write issue where native-derived struct is assigned to an inner structure field 2013-01-26 07:32:39 -05:00
Timothy Wall bd0425966f javadoc fixes 2013-01-26 07:31:23 -05:00
Dan Rollo 7089c83878 Merge pull request #188 from bhamail/test-getFieldOrder
Test get field order
2013-01-25 08:03:52 -08:00
Dan Rollo 9511c34c54 update changes 2013-01-25 11:02:09 -05:00
Dan Rollo c6e9d44c7d remove unused reference to peer. 2013-01-25 11:01:57 -05:00
Dan Rollo 3d051ecbb5 Merge pull request #187 from bhamail/test-getFieldOrder
Test runs under linux and Structure fixes all pass, so I will commit this. build.xml changes still need cleanup. Please holler with any other suggestions.
2013-01-24 21:58:39 -08:00
Dan Rollo f0ae20f0b6 kluges to get at least the Structure test to run under linux. This needs cleanup. 2013-01-25 00:39:46 -05:00
Dan Rollo 2c83e4c22b fix getFieldOrder() to return correct field names for X11 structures. 2013-01-25 00:38:23 -05:00
Dan Rollo 07eaffd28f comment out manual test method. 2013-01-24 23:21:06 -05:00
Dan Rollo 8c1f995e4e changes to allow StructureFieldOrderTest to run on linux. Still needs fixes to platform build.xml to allow this to run under linux AND fixes are needed for X11 Structure.getFieldOrder() methods. 2013-01-24 23:16:15 -05:00
Dan Rollo f721075ac3 Merge pull request #186 from bhamail/master
fix platform project compile on linux
2013-01-24 19:54:55 -08:00
Dan Rollo da711cc76b allow platform project to compile on non-windows jvm. 2013-01-24 22:48:49 -05:00
Dan Rollo d9fb94a13d Merge pull request #183 from bhamail/test-getFieldOrder
Test Structure.getFieldOrder()

All Structure warnings are solved, so I'm going to commit this.

BTW, I saw something odd ("has unknown size" error) when instantiating an empty Structure (one with no instance fields). Please see the @todo comments in com.sun.jna.StructureFieldOrderInspectorTest.java. Restore the test: testCheckMethodGetFieldOrderStaticFieldOnlyStatic() to reproduce the behavior.
2013-01-24 18:51:37 -08:00
Dan Rollo 9da1b4528d re-do skip windows tests that will fail if current user is non-admin 2013-01-24 21:12:13 -05:00
Dan Rollo 768ea368a6 re-update changes doc 2013-01-24 20:52:46 -05:00
Dan Rollo 6ff34c29db Revert "update changes doc"
This reverts commit 6d608dd49b.
2013-01-24 20:39:56 -05:00
Dan Rollo acdfd6ea20 Revert "skip test that will fail if user it non-admin"
This reverts commit f10c45b1f8.
2013-01-24 20:38:22 -05:00
Dan Rollo b9bf45ecce Revert "skip test that will fail if current user is non-admin"
This reverts commit be0e5b51cd.
2013-01-24 20:37:54 -05:00
Dan Rollo b5df2c589a Revert "skip test that will fail if user is non-admin"
This reverts commit f8d521999c.
2013-01-24 20:37:32 -05:00
Dan Rollo dff973e9ee Revert "Resolve merge conflicts."
This reverts commit 4a0644f3cd, reversing
changes made to f8d521999c.
2013-01-24 20:36:20 -05:00
Dan Rollo 4a0644f3cd Resolve merge conflicts. 2013-01-24 17:51:09 -05:00
Dan Rollo f8d521999c skip test that will fail if user is non-admin 2013-01-24 17:27:16 -05:00
Dan Rollo be0e5b51cd skip test that will fail if current user is non-admin 2013-01-24 17:20:27 -05:00
Dan Rollo f10c45b1f8 skip test that will fail if user it non-admin 2013-01-24 17:05:44 -05:00
Dan Rollo 6d608dd49b update changes doc 2013-01-24 16:55:37 -05:00
Dan Rollo 70658a0279 add commented example of test for individual Structure class. 2013-01-24 16:33:10 -05:00
Dan Rollo f3ceebecfd fix getFieldOrder() to return correct field name: grpi3_group_sid instead of grpi3_group_id. 2013-01-24 16:26:30 -05:00
Dan Rollo 251eae5cac include super classes when looking for fields and getFieldOrder() method. 2013-01-24 16:15:41 -05:00
Dan Rollo 07b88af439 ignore ctor errors in stuctures manually validated by wolftobias. 2013-01-24 15:46:53 -05:00
Dan Rollo 959616e992 patch from twall: addresses the missing default constructor warnings. 2013-01-24 15:25:05 -05:00
Dan Rollo f7b2f910b7 ignore static fields as per twall notes. 2013-01-24 15:10:00 -05:00
Dan Rollo 4220566fb4 support compiling platform project with 64bit jvm. 2013-01-24 14:05:46 -05:00
Dan Rollo 415179f9b7 fix compiler warning from invalid chars in javadoc, like: User32.java:1511: warning: unmappable character for encoding UTF8 2013-01-24 13:56:11 -05:00
Tobias Wolf 9a9f8cbd99 added some Excel example 2013-01-24 15:17:23 +01:00
Tobias Wolf 319f6e9047 some cosmetic changes 2013-01-24 13:47:55 +01:00
Tobias Wolf 9b7d02618e some changes to the Word implementation 2013-01-24 13:05:09 +01:00
Dan Rollo ed2f4d3b05 add unit test to platform project to scan for Structure.getFieldOrder() problems. 2013-01-24 02:34:21 -05:00
Dan Rollo fef81ce17f change ignore constructor error list to be list of classname prefixes. allows for ignoring all inner classes of a given class. 2013-01-24 02:22:54 -05:00
Dan Rollo 1942640b2d add batch version of check method 2013-01-24 02:07:44 -05:00
Dan Rollo d8232c9122 allow user supplied list of classes for which to ignore constructor errors. 2013-01-24 01:45:58 -05:00
Dan Rollo 1a8b3b55d8 handle inaccessible getFieldOrder() method. 2013-01-24 01:32:55 -05:00
Dan Rollo 156d2015a5 try adding reflections test libs via file name pattern. 2013-01-24 01:09:43 -05:00
Dan Rollo 8cbbb1eec8 try adding reflections test lib file name pattern. 2013-01-24 01:06:31 -05:00
Dan Rollo 351d68faf6 try adding reflections test libs via *.jar pattern. 2013-01-24 01:04:56 -05:00
Dan Rollo 6d0651acbc add jna test classes to test classpath so we can use StructureFieldOrder scanner. 2013-01-24 00:56:02 -05:00
Dan Rollo 7bd83c65f9 remove stale imports 2013-01-24 00:49:15 -05:00
Dan Rollo dfe8862e0f add jna test classes to test classpath so we can use StructureFieldOrder scanner. 2013-01-24 00:44:21 -05:00
Dan Rollo e89e70c9a6 add helper method 2013-01-24 00:32:24 -05:00
Dan Rollo 8f06411357 remove unneeded cast 2013-01-24 00:04:16 -05:00
Dan Rollo 011a2eaed7 testToScanForGetFieldOrderIssues 2013-01-24 00:02:39 -05:00
Dan Rollo f29b2f5c51 Add test utility to scan for Structure.getFieldOrder() issues. 2013-01-23 23:17:33 -05:00
twall 1a9d2daef3 Update CHANGES.md 2013-01-23 11:40:33 -05:00
twall 662f961d91 Announce DLL-based callbacks
Somehow forgot to include this when 3.5 went out.
2013-01-23 11:40:00 -05:00
twall 7e06d1ab81 Update CHANGES.md 2013-01-23 11:32:13 -05:00
Tobias Wolf 6a22e39d4c some new changes 2013-01-21 17:08:15 +01:00
Daniel Doubrovkine ff27aaffe3 Merged from xwizard/jna. 2013-01-21 08:22:55 -05:00
twall 601f1026eb Add line for linux-amd64 rebuild 2013-01-21 08:17:33 -05:00
Anthony Green bada2e326d Update README 2013-01-21 08:02:07 -05:00
Anthony Green 655bb8f369 Merge branch 'master' of github.com:/atgreen/libffi 2013-01-21 08:01:24 -05:00
Anthony Green 1035ffb2f4 Update README 2013-01-21 08:01:13 -05:00
Anthony Green 840f975866 Merge branch 'master' of github.com:/atgreen/libffi 2013-01-21 07:55:53 -05:00
Anthony Green aeb8719a34 New microblaze support 2013-01-21 07:55:37 -05:00
Anthony Green 40860245a4 New microblaze support 2013-01-21 07:37:30 -05:00
Anthony Green 20cae32b15 Xtensa support 2013-01-21 07:07:38 -05:00
Anthony Green 9742f91782 Mention IBM XL compiler support on AIX. 2013-01-21 07:03:41 -05:00
xwizard bdf59518fb Update CHANGES.md 2013-01-21 11:09:31 +01:00
Daniel Doubrovkine (dB.) 3f7e52a4d9 Merge pull request #178 from davidmc24/platform-userinfo10
platform: add mapping of USER_INFO_10 structure to LMAccess
2013-01-20 14:29:41 -08:00
David M. Carr 8da7dc2e56 changes: add entry for addition of USER_INFO_10 2013-01-20 15:00:26 -05:00
xwizard b1cda9cd72 Fixes "XDestroyWindowEvent does not provide enough names" error 2013-01-20 20:48:20 +01:00
David M. Carr 811d025b88 platform tests: add coverage for Netapi32.NetUserEnum with user level 10 2013-01-19 22:27:09 -05:00
David M. Carr c7e96bd3c0 platform: add mapping of USER_INFO_10 structure to LMAccess 2013-01-19 22:20:45 -05:00
Timothy Wall bc67864e57 compile linux-amd64 against glibc 2.3.6, with GLIBC_2.2.5 as newest symbol 2013-01-19 13:10:48 -05:00
twall 96a4450d70 Update www/FrequentlyAskedQuestions.md 2013-01-18 19:16:32 -05:00
twall 8591ebd55f Update www/FrequentlyAskedQuestions.md 2013-01-18 15:33:04 -05:00
Tobias 16b6d591d5 some changes regarding right structure size 2013-01-18 15:05:51 +01:00
Tobias 5e3e485d4d some changes 2013-01-18 11:04:17 +01:00
Tobias Wolf f7bd979d1b some changes 2013-01-17 18:02:52 +01:00
Tobias 176b44fd65 some changes 2013-01-17 16:34:32 +01:00
Tobias Wolf 548714343a some changes 2013-01-15 20:26:04 +01:00
twall 8ce6297b97 Merge pull request #175 from bnbeckwith/patch-1
Update contrib/platform/src/com/sun/jna/platform/unix/X11.java
2013-01-15 04:33:43 -08:00
Tobias 52897e2693 some changes 2013-01-15 13:20:58 +01:00
Tobias Wolf d5582d6181 fix for Variant structure
- the vt variable was from type Integer, correct is type USHORT
2013-01-14 20:16:49 +01:00
Tobias Wolf d9868285a0 some changes 2013-01-14 19:54:47 +01:00
Tobias Wolf 429bed5aba datatypes overworked 2 2013-01-14 17:49:58 +01:00
Tobias Wolf 3442e07023 datatypes over-worked 2013-01-14 17:43:07 +01:00
Benjamin Beckwith fef7e3786e Update contrib/platform/src/com/sun/jna/platform/unix/X11.java
Added "event" to the list of fields for XDestroyWindowEvent's getFieldOrder() method.
2013-01-14 11:22:04 -05:00
Tobias Wolf e77f69908a changed brecord struct 2013-01-14 14:22:46 +01:00
Tobias c2be88fd9c some changes 2013-01-14 12:32:26 +01:00
Tobias 85f8c409de some changes in Variant 2013-01-14 11:18:25 +01:00
Anthony Green f03eab0824 Remove obsolete inline test functions 2013-01-11 17:14:11 -05:00
Anthony Green 05fbe1faed xlc compiler support 2013-01-11 16:54:40 -05:00
Anthony Green 0b4986a788 [travis] install dejagnu with sudo 2013-01-11 11:19:52 -05:00
Anthony Green 3c337eef51 [travis] install dejagnu 2013-01-11 11:18:14 -05:00
Anthony Green 90720962ce Add first travis config file 2013-01-11 10:57:30 -05:00
Tobias ad442d822d some changes 2013-01-11 16:28:49 +01:00
Anthony Green bff052d9cd 32-bit x86 fix and more 2013-01-11 10:24:32 -05:00
Tobias bbfc36e8c6 some changes 2013-01-11 16:19:07 +01:00
Tobias 136dbaa257 some changes to Variant 2013-01-11 14:05:13 +01:00
Anthony Green cd41aeab61 Add compiler column to table 2013-01-10 17:25:45 -05:00
Anthony Green 8bf987d4df Fix for sunpro compiler on Solaris 2013-01-10 17:24:51 -05:00
Anthony Green 3ee74fd6dc Update documentation version. 2013-01-10 17:15:03 -05:00
Anthony Green 13e2d7b925 Handle both 32 and 64-bit x86 builds regardless of target triple 2013-01-10 10:52:02 -05:00
Tobias b6215a24b5 some changes in the Variant structure 2013-01-10 14:34:44 +01:00
Anthony Green 5141543000 Don't run EH tests with non-GNU compiler 2013-01-10 07:35:53 -05:00
Anthony Green 56ba8d86f4 Don't use warning checking macro with sun compiler 2013-01-10 07:25:10 -05:00
Anthony Green 6a028caec1 Don't use GCCisms to define types when
+       building with the SUNPRO compiler.
2013-01-10 01:19:43 -05:00
Anthony Green 2d9b393975 Fix for closures with sunpro compiler 2013-01-09 21:14:54 -05:00
Tobias Wolf c62b73bdf5 some changes 2013-01-09 14:48:10 +01:00
Anthony Green 8308984e47 Make sure we're running dejagnu tests with the right compiler. 2013-01-08 15:14:21 -05:00
Anthony Green f26c7ca671 Make compiler options in dejagnu runs compiler specific 2013-01-08 14:47:05 -05:00
Anthony Green 74c776e219 Switch x86 Solaris to X86 from X86_64 2013-01-08 12:25:54 -05:00
Anthony Green 8962c8c8d0 Fix read-only eh_frame test 2013-01-08 12:22:24 -05:00
Anthony Green 35ddb69c2b Only emit DWARF unwind info when building with GCC 2013-01-08 07:53:37 -05:00
Anthony Green f7879bc3f3 Testsuite fix for Solaris vendor compiler 2013-01-08 07:30:28 -05:00
Anthony Green 67cea90fc0 mend 2013-01-07 06:30:24 -05:00
Thorsten Glaser 0de3277b18 Testsuite fixes (was Re: [PATCH] Fix libffi on m68k-linux-gnu, completely)
Dixi quod…

>although I believe some 3.0.11 checks to be broken:

And indeed, with a few minor changes on top of git master,
I still get a full run of PASS plus one XPASS on amd64-linux!

With the other patches (from this message’s parent) and
these applied, I get a full PASS on m68k-linux as well.

So, please git am these three diffs ☺

bye,
//mirabilos
--
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh
From 5cb15a3bad1f0fb360520dd48bfc938c821cdcca Mon Sep 17 00:00:00 2001
From: Thorsten Glaser <tg@mirbsd.org>
Date: Sun, 2 Dec 2012 23:20:56 +0000
Subject: [PATCH 1/2] Fix tests writing to a closure retval via pointer casts

As explained in <Pine.BSM.4.64L.1212022014490.23442@herc.mirbsd.org>
all other tests that do the same cast to an ffi_arg pointer instead.

PASS on amd64-linux (Xen domU) and m68k-linux (ARAnyM)

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
2013-01-07 06:22:51 -05:00
Anthony Green 8f4772f383 m68k fixes for signed 8 and 16-bit calls. 2013-01-07 06:14:53 -05:00
Anthony Green ea7f8440d5 remove gcc-ism 2013-01-04 09:09:32 -05:00
Tobias Wolf 2832feaa8e Additional changes to the com implementation 2013-01-03 19:37:31 +01:00
Anthony Green f06c0f1037 Add missing ChangeLog entry and generated files. 2013-01-02 09:39:17 -05:00
Anthony Green 1f8675d4c1 Merge pull request #26 from rofl0r/master
fix build error on ppc when long double == double
2013-01-02 06:34:38 -08:00
Anthony Green 335f419a86 Merge pull request #23 from rurban/master
cygwin/mingw shared libs need libtool LDFLAGS = -no-undefined
2013-01-02 06:30:03 -08:00
Anthony Green 53236d5061 Regenerate files 2013-01-02 09:24:55 -05:00
Anthony Green 72222ca3fb Update texinfo.tex 2013-01-02 09:06:38 -05:00
Anthony Green 1e326c9543 Update config.guess and config.sub 2013-01-02 09:05:02 -05:00
Anthony Green cb6671f5b8 Missing .gitignore changes for xcode support 2013-01-02 08:56:07 -05:00
Anthony Green ebbe779668 missed x32 libtool patch. 2013-01-02 08:54:05 -05:00
Anthony Green 4394096da0 missed trampoline_table patch. Move to GCC. 2013-01-02 08:51:35 -05:00
Anthony Green ed7a59c3ff Windows symbol export fix. Move to GCC. 2013-01-02 08:48:01 -05:00
Anthony Green ccee09a4ff +2012-03-21 Peter Rosin <peda@lysator.liu.se>
+
+       * testsuite/lib/target-libpath.exp [*-*-cygwin*, *-*-mingw*]
+       (set_ld_library_path_env_vars): Add the library search dir to PATH
+       (and save PATH for later).
+       (restore_ld_library_path_env_vars): Restore PATH.
2013-01-02 08:41:55 -05:00
Anthony Green 089dbce7cc med 2013-01-02 08:37:35 -05:00
Anthony Green 980a334c42 Test GCC update 2013-01-02 08:34:01 -05:00
Anthony Green 8bad679ade New stand-alone patch 2013-01-02 08:28:35 -05:00
Anthony Green 981c32ee11 Merge with GCC. Eliminate quilt bits. 2013-01-02 07:34:03 -05:00
Tobias Wolf f90fd1288b added MS COM support and MS Office samples 2013-01-01 14:14:56 +01:00
Tobias Wolf 2e27312ea0 Variant structure added 2013-01-01 14:14:55 +01:00
unknown f2b6eb5e7a Updated CHANGES. 2012-12-11 20:35:01 -05:00
Daniel Doubrovkine 24439832da Merge branch 'master' of https://github.com/wolftobias/jna into wolftobias 2012-12-11 20:09:02 -05:00
Daniel Doubrovkine (dB.) 89c1f7fa4c Removed extra dot. 2012-12-10 16:02:20 -05:00
Tobias Wolf b78eef7789 add unit test to guid structure 2012-12-10 15:20:38 +01:00
Tobias Wolf aaa7fd0123 fixed some changes asked by the jna team 2012-12-09 19:30:44 +01:00
Tobias Wolf 8b17879219 Fixed some problems with the guid structure
- Now the java guid structure can be used directly as alternative to
'Ole32Util.getGUIDFromString()'.
- The listening for usb devices is now working also with filter usage
2012-12-08 10:51:48 +01:00
Tobias Wolf 6ab495c8eb extension for listening to windows devices (usb) 2012-12-07 16:41:05 +01:00
twall 03be32b103 Add Native.register() call. 2012-12-05 09:34:36 -05:00
Tobias Wolf 4218a07549 code extension for creating and registering win32 windows
Create new code for registering new window classes and creating window
example. Listening for win32 window events. Listening for logoff/logon
events. Created also new api for 'Wtsapi32.dll'.
2012-12-01 17:46:10 +01:00
Anthony Green 61a0549295 Refresh config.guess and config.sub 2012-11-28 06:07:41 -05:00
rofl0r f6b58d2bdc fix build on ppc when long double == double 2012-11-22 16:26:21 +01:00
Dan Rollo 17a26e7dbc Merge pull request #160 from bhamail/master
re-fix broken download links (to maven central for now). See Issue #158
2012-11-21 18:33:22 -08:00
Dan Rollo 580dd76041 re-fix broken download links (reported by hanneshorn). For now pointing to maven central copies. Not sure why github blob links work, then don't. 2012-11-21 21:30:13 -05:00
Dan Rollo 74ae45c476 re-fix broken download links (reported by hanneshorn). For now pointing to maven central copies. Not sure why github blob links work, then don't. 2012-11-21 21:26:35 -05:00
Dan Rollo d6d99a9b6b re-fix broken download links (reported by hanneshorn). For now pointing to maven central copies. Not sure why github blob links work, then don't. 2012-11-21 21:25:02 -05:00
Dan Rollo 3854e50e64 Merge pull request #159 from bhamail/master
fix dead download links.
2012-11-21 18:15:57 -08:00
Dan Rollo a8966e8dcf fix broken download links (reported by hanneshorn). 2012-11-21 21:13:15 -05:00
Anthony Green 69da33a076 Pull in config.sub for aarch64 support and more 2012-11-12 15:25:47 -05:00
twall 98c7993a41 Bump UnsatisfiedLinkError help 2012-11-09 09:32:48 -05:00
twall 662763fdcc Indicate getFieldOrder() usage 2012-11-09 09:31:13 -05:00
twall 47211510b0 Use getFieldOrder() 2012-11-09 09:29:32 -05:00
Dan Rollo 997ff2e7ed Merge pull request #157 from bhamail/master
add release step info to exclude committing platform specific jar.
2012-11-08 09:07:45 -08:00
Dan Rollo 32d19f0a61 add release step info to exclude committing platform specific jar. 2012-11-08 12:04:41 -05:00
Dan Rollo a5ce77f5c4 add release step info to exclude committing platform specific jar. 2012-11-08 12:01:30 -05:00
Dan Rollo 464e03172f add release step info to exclude committing platform specific jar. 2012-11-08 11:55:51 -05:00
Dan Rollo d9ad71341c Merge pull request #156 from bhamail/fix-snapshot-deploy
Fix snapshot deploy
2012-11-07 13:51:22 -08:00
Dan Rollo 4eedc67bf0 make regex global to replace both 'version' tag values (artifact version and jna dependency version) in pom-platform.xml. 2012-11-07 16:47:25 -05:00
Dan Rollo c96712eadc fix deploy snapshot target to include sources and javadoc. 2012-11-07 16:45:30 -05:00
Anthony Green f680b598b7 Add missing aarch64 configury bits 2012-11-06 16:00:40 -05:00
Timothy Wall 3b2fd06dc0 compile against GNU C Library 2.3.6 2012-10-31 20:50:38 -04:00
Anthony Green dfadfb1985 Rebase for ppc64 fix 2012-10-31 06:46:41 -04:00
Anthony Green e944b8c7eb Add PaX work-around 2012-10-30 14:06:40 -04:00
Anthony Green 9ccd51be1f Fix commit conflicts 2012-10-30 13:37:37 -04:00
Anthony Green f342996cb5 Darwin12 fix 2012-10-30 07:42:27 -04:00
Anthony Green 58e8b66f70 AArch64 port 2012-10-30 07:36:49 -04:00
Anthony Green fa5d747905 AArch64 port 2012-10-30 07:07:19 -04:00
Anthony Green 6993a6686f Fix autoconf macros 2012-10-30 06:59:32 -04:00
Dan Rollo 296b97d58a Merge pull request #153 from bhamail/master
Prep for next development iteration.
2012-10-27 18:44:07 -07:00
Dan Rollo 363db04779 Increment version for next development iteration. 2012-10-27 21:20:03 -04:00
Dan Rollo 13f2419f33 For some reason, depenency version on jna didn't get updated in pom-platform.xml, so update now 2012-10-27 20:57:32 -04:00
Dan Rollo ec9868b85b Merge pull request #152 from bhamail/master
Release 3.5.1 - dist jars, etc.
2012-10-27 17:40:39 -07:00
Dan Rollo a31faf3026 Release 3.5.1 - commit 'ant clean dist' generated files. 2012-10-27 20:35:00 -04:00
Dan Rollo e1fda6694b Release 3.5.1 - add notes about 'ant clean dist' additional files to commit. 2012-10-27 20:33:04 -04:00
Dan Rollo 2fb117023b Release 3.5.1 - add note about 'ant clean dist'. 2012-10-27 15:28:19 -04:00
Dan Rollo d2a70dac78 Release 3.5.1 - add note about manual delete of platform.jar 2012-10-27 14:54:00 -04:00
Dan Rollo 18218163fd Release 3.5.1 - Update README.md links 2012-10-27 14:45:49 -04:00
Dan Rollo fccab0ac15 Release 3.5.1 - set release versions, update notes 2012-10-27 14:40:39 -04:00
Daniel Doubrovkine 02a01db39a Made 3.5.0 links go to Maven. 2012-10-27 08:24:40 -04:00
Dan Rollo bd950aa654 Merge pull request #149 from bhamail/master
update release docs
2012-10-24 20:59:50 -07:00
Dan Rollo 32758ee8e2 add note to send release notice. 2012-10-24 23:57:35 -04:00
Dan Rollo 0c79114d30 typo 2012-10-24 23:57:18 -04:00
Dan Rollo 43b426410d update release docs to include incrementing version for next development iteration. 2012-10-24 23:52:08 -04:00
Dan Rollo 26de4b0dd0 update release notes to include incrementing version for next development iteration. 2012-10-24 23:51:09 -04:00
Dan Rollo 58243488fc Merge pull request #148 from bhamail/master
revert publish sources SNAPSHOT jar. Only do jars for now.
2012-10-24 20:01:40 -07:00
Dan Rollo 489b5ddde1 Merge remote branch 'upstream/master' 2012-10-24 22:59:51 -04:00
Dan Rollo 0d0d36d599 revert: deploy sources and javadoc SNAPSHOT jars. Only do jar for now. 2012-10-24 22:58:57 -04:00
Dan Rollo 2d454fb7dc Merge pull request #147 from bhamail/master
also deploy sources and javadoc SNAPSHOT jars.
2012-10-24 18:58:49 -07:00
Dan Rollo 5097ed533f update 'deploy snapshot' target to also deploy sources and javadoc SNAPSHOT jars. 2012-10-24 21:56:59 -04:00
Dan Rollo 160dee7d84 Merge pull request #146 from bhamail/master
increment to next development version (if "-SNAPSHOT" suffix causes problems, I will remove it).
2012-10-24 17:40:43 -07:00
Dan Rollo 7395736b9f increment jna.version to next development version (3.5.1-SNAPSHOT). 2012-10-24 20:10:59 -04:00
Daniel Doubrovkine (dB.) b64c489135 Update CHANGES.md 2012-10-24 19:11:14 -03:00
Daniel Doubrovkine (dB.) fffc3f0f7c Merge pull request #145 from aikidojohn/master
Fixing Netapi32Util.getDomainTrusts() includes "empty" domain object
2012-10-24 15:10:00 -07:00
John Hite 5dd4e0c846 Updating CHANGES.md 2012-10-24 17:20:44 -04:00
John Hite e32ae1cae6 Fixing the DOMAIN_CONTROLLER_INFO structure. It was missing a field declaration. This should fix the getDC method and unit test 2012-10-24 17:09:32 -04:00
John Hite 8771dce348 Fixing null values in first domain trust array entry 2012-10-24 16:15:50 -04:00
Daniel Doubrovkine (dB.) 3ac6f75611 Update www/Contributing.md 2012-10-20 17:33:17 -03:00
Dan Rollo f88d243071 Merge pull request #143 from bhamail/master
Release 3.5.0 - dist jars and doc links
2012-10-18 18:53:11 -07:00
Dan Rollo feb7b88279 Release 3.5.0 - Update README.md, commit and push. 2012-10-18 21:33:40 -04:00
Dan Rollo 070b47e825 Release 3.5.0 - Run ant dist target. Commit and push generated jar files in dist. Includes new jna-min.jar. 2012-10-18 21:25:14 -04:00
Dan Rollo c1289c07be Merge pull request #141 from bhamail/master
typo
2012-10-15 09:12:47 -07:00
Dan Rollo e68fd9dfaf doc typo 2012-10-15 12:00:35 -04:00
twall f23a4bf9d5 Merge pull request #139 from trespasserw/patch-1
Diagnostic for temp jnidispatch file creation
2012-10-13 06:05:36 -07:00
Anthony Green 70084e70dd Update Tile* port info 2012-10-12 23:55:06 -04:00
Anthony Green 9c00a3f674 TILE-Gx/TILEPro support 2012-10-12 16:46:06 -04:00
Anthony Green 048d2f41c3 Rebase 2012-10-11 10:55:25 -04:00
Roman Shevchenko b769daec0c Diagnostic for temp jnidispatch file creation
Nesting underlying exception will provide more insight
on what may caused an error.
2012-10-11 14:38:59 +03:00
Daniel Doubrovkine (dB.) 4e36f71f3a Merge pull request #137 from danwi/registry_get_empty_values
Add issue #135 to CHANGES.md
2012-10-08 08:32:02 -07:00
Daniel Wiklund 25db8ccfa7 Add issue #135 to CHANGES.md 2012-10-08 16:56:44 +02:00
Daniel Doubrovkine (dB.) 5c2923c0af Merge pull request #136 from danwi/registry_get_empty_values
Add fix for issue #135 in Advapi32Util (reading empty values)
2012-10-08 07:33:25 -07:00
Daniel Wiklund 018ad7f2c0 Add fix for issue #135 in Advapi32Util (reading empty values)
With this fix it is possible to read values from registry of the following
types even when the size of the value is 0:

REG_SZ
REG_EXPAND_SZ
REG_MULTI_SZ
REG_NONE
REG_BINARY (fixed by earlier committer)

Advapi32UtilTest updated with unit test triggering the bug.
2012-10-08 16:16:30 +02:00
Timothy Wall c1a7fd7267 Merge branch 'master' of github.com:twall/jna 2012-10-06 11:49:59 -04:00
Timothy Wall 3c086de42c add 'min' jar to dist 2012-10-06 11:49:09 -04:00
Timothy Wall b48390fc1e note platforms where test fails 2012-10-06 10:30:50 -04:00
Timothy Wall 136fe02333 Merge branch 'master' of github.com:twall/jna 2012-10-06 09:01:54 -04:00
Timothy Wall 5f9d100b2d attach native thread as daemon to avoid tests hanging on exit 2012-10-06 09:01:30 -04:00
twall 176f3f32d4 Update www/FrequentlyAskedQuestions.md 2012-10-06 09:47:27 -03:00
twall 2667202a3f Move native long != Java long to top of list 2012-10-06 09:46:50 -03:00
Timothy Wall 245eb88b40 fix #128, use 16-bit mask for upper/lower parts of DWORD 2012-10-06 00:49:17 -04:00
Timothy Wall d51479c357 update changes, fixes #113, fixes #114 2012-10-06 00:44:07 -04:00
Timothy Wall 7a583b1aaa apply PR #114, support for gnu/kfreebsd 2012-10-06 00:38:56 -04:00
Timothy Wall eaff9bd176 fixes #129 2012-10-05 06:58:14 -04:00
Timothy Wall da4d941906 add dlopen mods to changelog 2012-10-05 05:48:30 -04:00
Dan Rollo ed94e60da3 Merge pull request #132 from bhamail/maven-cleanup
note maven changes
2012-10-04 19:24:38 -07:00
Dan Rollo 2fe6c956b4 note maven changes 2012-10-04 22:22:45 -04:00
Timothy Wall 559c7d7f13 add library open options 2012-10-04 21:58:28 -04:00
Timothy Wall 6b7f2eeadb catch all AWT loading errors 2012-10-02 07:26:58 -04:00
Dan Rollo 7bda1b3d0e Merge pull request #131 from bhamail/maven-cleanup
Maven cleanup
2012-10-01 17:10:45 -07:00
Dan Rollo d516b01c75 Add note about settings.xml location. 2012-10-01 20:07:45 -04:00
Dan Rollo 08c579f0cb Add note about settings.xml location. 2012-10-01 20:06:33 -04:00
Timothy Wall c231069066 fix typos 2012-09-29 11:26:17 -04:00
Timothy Wall ec16947808 update w32ce-arm build, native 2012-09-29 09:13:39 -04:00
Dan Rollo 2d61573175 Merge pull request #126 from bhamail/maven-cleanup
Maven cleanup
2012-09-27 15:06:49 -07:00
Dan Rollo 507c065c0e fix typo 2012-09-27 17:47:18 -04:00
Dan Rollo cf6b6299e0 Keep pom-platform.xml version tag in since automatically (same as pom.xml version tag). Update release docs to match. Add a note that 'deploy' target only works for SNAPSHOT. 2012-09-27 17:45:31 -04:00
Dan Rollo 862a746170 Update maven release step links. 2012-09-27 15:02:00 -04:00
Dan Rollo 14717ce21f Update maven release steps. 2012-09-27 14:59:06 -04:00
Dan Rollo 72aade4f8f fix typo 2012-09-27 14:52:35 -04:00
Dan Rollo fbf75539f9 fix typo 2012-09-27 14:51:45 -04:00
Dan Rollo 879402d020 md format cleanup 2012-09-27 14:49:15 -04:00
Dan Rollo 7296f2213d Add step in release process to update the pom <version> values to match the version (jna.version) in build.xml. 2012-09-27 14:44:25 -04:00
Dan Rollo fb243c6cf5 Add reference to java.net maven repo docs. 2012-09-27 13:50:47 -04:00
Dan Rollo 20d1a720ce Add slash to urls, to match doc's examples. 2012-09-27 13:50:22 -04:00
Dan Rollo ea12e0755b settings.xml example 2012-09-26 22:37:48 -04:00
Dan Rollo 83cc22a24c settings.xml example 2012-09-26 22:36:44 -04:00
Dan Rollo c795c80439 Go back to using java.net maven repo. Add settings.xml example. 2012-09-26 22:31:36 -04:00
Dan Rollo edab625da6 Change deploy snapshot target to include platform jar. 2012-09-26 11:33:36 -04:00
Dan Rollo 9f9240391b Add failonerror=true to mvn calls so ant build will fail if mvn goal fails. 2012-09-25 21:11:10 -04:00
Dan Rollo 4fbbc6b42a comment cleanup 2012-09-25 21:01:45 -04:00
Dan Rollo cdbc379608 comment cleanup 2012-09-25 20:59:38 -04:00
Dan Rollo bfeac30452 Add warning about quiet mvn failures. 2012-09-25 20:54:08 -04:00
Dan Rollo 2e7d188afa Add warning about quiet mvn failures. 2012-09-25 20:53:39 -04:00
Dan Rollo d291bd52cd Extract maven-gpg-plugin version to common property. Add 'useagent' so will be prompted for gpg passphrase. 2012-09-25 20:45:47 -04:00
Dan Rollo d8e8fd09a6 Remove obsolete maven artifact files. 2012-09-25 19:55:52 -04:00
Dan Rollo d66471e4c0 Restore 'depends' to maven targets - some jars are not banked in 'dist'. Make maven artifact jar names more consistent. Only include files (src, javadoc) for the specific project (jna or platform). 2012-09-25 19:49:54 -04:00
Dan Rollo bb7d364f45 Update maven repo URL's to use sonatype for publishing to central repo. Remove 'depends' from maven deploy and stage tasks - will use what is in 'dist' folder. 2012-09-25 17:19:34 -04:00
Dan Rollo f9f8474e7f Add maven ant tasks jar to lib dir for use in deploying maven artifacts. Update maven repo URL's to use sonatype for publishing to central repo. Remove 'depends' from maven deploy and stage tasks - will use what is in 'dist' folder. 2012-09-25 17:05:47 -04:00
Dan Rollo e2cac3a280 Remove unused tags, add dependency to jna 2012-09-25 12:45:51 -04:00
Dan Rollo d6b5c2c797 Remove unused tags 2012-09-25 12:00:36 -04:00
twall c0e51cb47f Update www/DirectMapping.md 2012-09-25 11:57:04 -03:00
twall 03f054b474 Update www/DirectMapping.md 2012-09-25 11:56:18 -03:00
twall 511676e0e9 Update www/GettingStarted.md 2012-09-25 08:11:06 -03:00
twall 94ac8af162 Update www/GettingStarted.md 2012-09-25 08:08:43 -03:00
twall a814936bd7 Note direct mapping and link 2012-09-25 08:06:52 -03:00
twall e42b2ca09d Link directly to examples 2012-09-25 08:02:43 -03:00
Timothy Wall 7be159d0c2 update solarix/intel natives 2012-09-24 19:33:02 -04:00
Timothy Wall c53c384096 update sunos natives 2012-09-24 23:46:00 +02:00
dblock 6a52c22a02 Moved some hanging docs into www. 2012-09-24 09:09:53 -04:00
Daniel Doubrovkine 6f30debd34 Minor prettifications to CHANGES. 2012-09-23 18:43:24 -04:00
Timothy Wall d400921e17 Merge branch 'master' of github.com:twall/jna 2012-09-23 17:30:28 -04:00
Timothy Wall e95b37e5de update android-arm native 2012-09-23 17:29:51 -04:00
Timothy Wall b9cc27c1ad update win32-x86 native 2012-09-23 15:14:11 -04:00
Timothy Wall c8852f7c44 update win32-x86 native 2012-09-23 14:44:22 -04:00
Timothy Wall 18b0700337 obsolete outdated native jars, update darwin 2012-09-23 14:08:04 -04:00
Timothy Wall 8d535e72c7 update win32-amd64 native 2012-09-23 12:43:56 -04:00
Timothy Wall 2f51fc68cb fix file perms 2012-09-23 09:28:00 -04:00
Timothy Wall 1f1972bf0e remove msvc90 dependency, spurious '-g' flags in libffi, fix compiler warnings against dlmalloc.c 2012-09-23 08:37:30 -04:00
Timothy Wall e91fbd35c2 tweaks for win32-amd64 build 2012-09-23 02:24:52 -04:00
Timothy Wall f46c5ffc2b w32 tweaks 2012-09-22 22:40:33 -04:00
Timothy Wall a9f90b508a fix build on w32 2012-09-22 21:03:29 -04:00
Timothy Wall 7dd96c6978 fix build on win32 2012-09-22 20:45:03 -04:00
Timothy Wall 0c888d992b accommodate makefile variable overrides from ant or environment 2012-09-22 19:58:14 -04:00
Timothy Wall 14da21e9f9 Merge branch 'master' of github.com:twall/jna 2012-09-22 17:06:20 -04:00
Timothy Wall 019e861539 merge android branch 2012-09-22 17:05:24 -04:00
Kristian Rosenvold 79d208096b o Added first (untested) verison of how to publish to maven central 2012-09-22 11:32:47 +02:00
Timothy Wall 28c4c5fef5 merge from upstream 2012-09-21 06:57:14 -04:00
Timothy Wall 5e211134d5 merge from master 2012-09-21 06:55:08 -04:00
Timothy Wall 310e829d70 note changes 2012-09-21 00:29:29 -04:00
Timothy Wall 3d0040a183 check more thoroughly for unanticipated exceptions 2012-09-20 23:57:20 -04:00
Timothy Wall bbb0501f76 properly propagate exceptions through native code 2012-09-20 23:41:03 -04:00
Timothy Wall 641b7aa3ad fix crash on win64 2012-09-20 22:45:22 -04:00
Timothy Wall 1572b12f75 merge from master 2012-09-20 17:37:25 -04:00
Timothy Wall 689ddc493f android doesn't support shlib jar unpack; place in a convenient location instead 2012-09-20 17:28:33 -04:00
Timothy Wall cb05293c11 clean up thread termination handling 2012-09-20 16:19:25 -04:00
Timothy Wall d5e2ee902d update change log 2012-09-20 15:59:14 -04:00
Timothy Wall b9995b2ad0 w32 thread auto-cleanup 2012-09-20 15:02:07 -04:00
Timothy Wall bd243519df w32 implementation 2012-09-20 13:52:34 -04:00
Timothy Wall f11614bc27 simplified thread-local destructor (pthreads) 2012-09-20 13:17:47 -04:00
Timothy Wall 58a5185c20 auto-cleanup of attached callback threads 2012-09-20 08:41:57 -04:00
Timothy Wall e92ff82c19 update android instructions 2012-09-20 07:21:36 -04:00
Timothy Wall c4c07d7878 fixes issue #121 2012-09-20 01:17:55 -04:00
Timothy Wall e07ed3082d clean up some var usage 2012-09-20 01:14:09 -04:00
Timothy Wall 5728822dad tweak formatting 2012-09-19 13:49:32 -04:00
Timothy Wall fd13022f7c don't copy out-of-date.jar to dist, copy native jars *only* directly from lib/native 2012-09-19 11:23:39 -04:00
Timothy Wall 296eaec0e6 perform cross-builds into dedicated build directory 2012-09-19 10:28:45 -04:00
Timothy Wall 8b8672214c add android native jar 2012-09-19 10:08:04 -04:00
Timothy Wall 2f662bcf6d remove obsolete setFieldOrder references 2012-09-19 10:03:39 -04:00
Timothy Wall 35f12b7027 merge from master 2012-09-19 09:51:01 -04:00
Timothy Wall 719fab1ad2 fix main class reference 2012-09-18 22:38:44 -04:00
Timothy Wall 67ffdd5168 pushed wrong versions of demo jars 2012-09-18 22:32:34 -04:00
Timothy Wall afc3fe3687 update demos to include full native libs 2012-09-18 22:27:14 -04:00
Timothy Wall 14dbeda4ed fix broken demo jars 2012-09-18 22:24:28 -04:00
Timothy Wall f5ee066cc0 demos must be in same directory as jna.jar to run properly 2012-09-18 20:43:43 -04:00
Timothy Wall ad65bcccfb avoid spurious errors when common osx frameworks don't actually exist 2012-09-18 20:36:05 -04:00
Timothy Wall fab66d7d49 search additional OSX paths 2012-09-18 18:49:40 -04:00
Timothy Wall d78c38e4e2 update changelog 2012-09-19 00:14:22 +02:00
Timothy Wall 21cecef8ef fix crash with native mapped callback args 2012-09-18 21:58:39 +02:00
Timothy Wall 3e8511fbc6 Merge branch 'master' of github.com:twall/jna 2012-09-18 09:34:58 -04:00
Timothy Wall 21863e190d use upstream libffi as subtree instead of separate local copy 2012-09-18 09:28:54 -04:00
Timothy Wall fb84300563 Merge libffi as native/libffi 2012-09-18 09:06:50 -04:00
Timothy Wall a8de00b8e5 fix MSVC dll callbacks build (mingw64 required) 2012-09-17 07:23:01 -04:00
Timothy Wall 5fd52be589 add missing file 2012-09-16 15:47:12 -04:00
Timothy Wall 6335fef0b1 fix build for MSVC express 10 2012-09-16 13:24:35 -04:00
Daniel Doubrovkine 3455742d89 The javadoc and src-mvn.zip should be ignored; out-of-date.jar is used to wipe all the native binaries when there's an incompatible JNI change. 2012-09-15 22:08:25 -04:00
Timothy Wall 6ba364f64f Merge branch 'master' of github.com:twall/jna into dll-callback 2012-09-15 21:58:55 -04:00
Daniel Doubrovkine 164da6cf1c Minor updates to CHANGES. 2012-09-15 21:28:33 -04:00
Daniel Doubrovkine 1b6bc6342e Re-added missing declaration. 2012-09-15 21:26:54 -04:00
Daniel Doubrovkine bde74fdccf Merged 3.5.0 from master. 2012-09-15 21:15:47 -04:00
Timothy Wall 6dd612162d synch with master 2012-09-15 17:58:44 -04:00
Timothy Wall 2ff4d20fad require structure field order 2012-09-15 17:52:01 -04:00
unknown fbcd02ae6e Merge branch 'master' of github.com:twall/jna into netapi32-fixes 2012-09-15 09:31:01 -04:00
Timothy Wall 6de51cdf5a move field validation out of layout derivation 2012-09-14 21:10:48 -04:00
unknown e97b1df6ee Merge branch 'master' of github.com:twall/jna into netapi32-fixes 2012-09-14 07:53:37 -04:00
Timothy Wall 65d68b8d70 avoid using deprecated setTypeMapper 2012-09-14 07:00:55 -04:00
Daniel Doubrovkine f915ec7e05 Merge branch 'master' of github.com:twall/jna into netapi32-fixes 2012-09-08 20:39:06 -04:00
Timothy Wall 44b4bc0cac fix gcc version check, avoid deprecated function in structure test 2012-09-08 16:27:08 -04:00
Daniel Doubrovkine 2a6ac9a20d Fixed ANT build and package name. 2012-09-08 16:22:52 -04:00
Daniel Doubrovkine 076298e343 Merged from master. 2012-09-08 16:11:47 -04:00
Timothy Wall 1c3ab0f80f fix javadoc errors 2012-09-08 16:04:27 -04:00
Timothy Wall a0ae2836d9 merge from upstream 2012-09-08 15:02:25 -04:00
Timothy Wall 2309762aca fix broken Structure.setFieldOrder issue 2012-09-08 11:07:05 -04:00
Daniel Doubrovkine e4d89f7087 Fixed typos. 2012-09-08 08:42:36 -04:00
Daniel Doubrovkine 44c41b6faf Fix: Netapi32Test broken. 2012-09-08 08:41:57 -04:00
Daniel Doubrovkine 8003de03ec Fix: w32keyhook package to make Eclipse happy. 2012-09-08 08:40:58 -04:00
twall c5ae6a3cbb Merge pull request #117 from phailwhale22/master
Closes issue #116
2012-09-07 16:34:22 -07:00
twall 4581cb2f61 Avoid invalid 3.4.2 build 2012-09-07 20:32:46 -03:00
phailwhale22 804795c5f8 fix for issue #116 (continued yet again)
I'm failing hard... ok to merge? Indentation was fixed and I removed the
try block.
2012-09-07 18:26:30 -04:00
Timothy Wall efce3ec30e update OSX native reference 2012-09-06 07:27:45 -04:00
Timothy Wall e56835fccc fix native jar file refresh 2012-09-06 07:25:42 -04:00
Timothy Wall 4f495756aa Merge branch 'master' of github.com:twall/jna 2012-09-06 07:05:38 -04:00
Timothy Wall 9dce43affa fix file perms 2012-09-06 07:03:33 -04:00
Timothy Wall 7200f90633 fix native jar propagation 2012-09-06 07:02:39 -04:00
Daniel Doubrovkine (dB.) 861e4cc3bc Update www/Contributing.md
Updated link to Windows Development Environment.
2012-09-05 11:46:33 -03:00
phailwhale22 c2c1f81ea5 fix for issue #116 (continued)
Some stuff that was missing from my previous commit. Sorry for the
hurdles, this is my first time contributing to a project. Updated the
appropriate unit test and CHANGES.md for version 3.4.3.
2012-09-04 19:00:17 -04:00
phailwhale22 14481ee346 fix for issue #116 2012-09-04 18:07:13 -04:00
Timothy Wall a92256bc72 keep native builds separate from dist; copy on dist 2012-09-03 09:13:07 -04:00
Timothy Wall be42dda63d update javadoc 2012-09-03 08:27:53 -04:00
Timothy Wall 7313da6156 bump version to 3.4.2 2012-08-31 09:17:01 -04:00
Timothy Wall b7d94d6a14 fix minor javadoc, compile bugs 2012-08-31 08:12:41 -04:00
Timothy Wall 782b11f201 fix issue #107 2012-08-27 23:23:34 -04:00
Timothy Wall aea387ce02 fix failing tests in StructureTest (avoid returning self when sharing memory) 2012-08-22 16:38:21 -04:00
Timothy Wall 4ddad49369 save function field offsets instead of actual function pointers, which may change 2012-08-21 21:43:17 -04:00
Timothy Wall 224f18fef4 fix file perms 2012-08-21 19:29:43 -04:00
Timothy Wall 2390543445 add dll callbacks, tests, explicit flags for dlopen 2012-08-21 19:28:40 -04:00
Timothy Wall 473d48b39b fix up Netapi32Test to match DS_DOMAIN_TRUSTS changes elsewhere; I vaguely recall db saying something about removing a related test entirely for duplication of effort, perhaps this was missed checking in? 2012-08-11 22:27:44 -04:00
Timothy Wall a947dfdac5 address issue #84 2012-08-11 18:03:27 -04:00
Timothy Wall b83e977839 ensure memory always initialized when calling useMemory, even if layout is unknown 2012-08-03 07:10:06 -04:00
Timothy Wall ab2d5a72e7 enforce declaration of structure field order 2012-08-02 07:28:30 -04:00
Timothy Wall bc5855e900 Merge branch 'master' of github.com:twall/jna 2012-08-02 07:08:47 -04:00
twall 2c5993d680 simplify env settings 2012-07-27 07:52:29 -03:00
Timothy Wall 2cc7fe3272 Merge branch 'master' of github.com:twall/jna 2012-07-27 06:39:38 -04:00
twall 958ecde56b Update www/WindowsDevelopmentEnvironment.md 2012-07-26 22:37:05 -03:00
twall 0a9a4c926a Update www/WindowsDevelopmentEnvironment.md 2012-07-26 22:36:20 -03:00
Daniel Doubrovkine a0b50515e2 Moved windows development environment to www. 2012-07-26 21:15:49 -04:00
Daniel Doubrovkine (dB.) edf2dacfac Made instructions prettier. 2012-07-26 22:13:06 -03:00
Timothy Wall d65bd51895 add windows build notes 2012-07-26 20:17:17 -04:00
Timothy Wall e0bd677ffc update win64 build to work with MSVS C++ Express 10 and cygwin+mingw64 2012-07-26 19:58:59 -04:00
Timothy Wall c7123cf59b add change note 2012-07-19 06:39:00 -04:00
Timothy Wall 187fcdc2fb use a more applicable return type 2012-07-19 06:37:42 -04:00
Timothy Wall a064b2a0e1 add android link 2012-07-17 07:38:50 -04:00
Daniel Doubrovkine (dB.) 777406eb7b Merge pull request #98 from trejkaz/master
Third attempt at fixing Netapi32Util.getDomainTrusts()
2012-07-13 15:31:19 -07:00
twall 37f108fa51 Merge pull request #70 from jglick/master
Warnings reported by FindBugs et al.
2012-07-13 04:47:37 -07:00
Daniel Doubrovkine (dB.) f0817a3e75 Update master 2012-07-13 08:35:18 -03:00
Daniel Doubrovkine (dB.) 0eb9636bdf Prettified CHANGES, more consistent between w32 and win32. 2012-07-13 08:34:29 -03:00
Timothy Wall 3f3872974e closes #100 2012-07-13 07:32:34 -04:00
Timothy Wall 99533d2052 more unsigned fixes 2012-07-13 07:21:17 -04:00
Timothy Wall dce035056a fix some unsigned pointer-aliasing types, platform/win32 2012-07-13 07:12:47 -04:00
Trejkaz (pen name) 53cb504e90 Use Structure.toArray() instead of domains.getTrusts() 2012-07-13 10:46:39 +10:00
Daniel Doubrovkine 2162f14786 Moved Kernel32 definitions into Kernel32.java, added GetEnvironmentVariable. 2012-07-12 19:48:48 -04:00
Trejkaz (pen name) bd7fdf2438 Third attempt at fixing Netapi32Util.getDomainTrusts(). 2012-07-13 09:13:46 +10:00
Daniel Doubrovkine cc399eca28 Fixed testReadFile, not always null-terminated. 2012-07-12 16:08:40 -04:00
Daniel Doubrovkine adb048c01a Don't use NativeLong, equivalent to int on Windows. 2012-07-12 15:54:19 -04:00
Daniel Doubrovkine 738900d840 Using int and IntByReference for ULONG, also added ULONG. 2012-07-12 14:25:26 -04:00
Timothy Wall 3755747fda update notes 2012-07-12 08:45:48 -04:00
twall 36020c6d33 Merge pull request #95 from buckensens/master
Check for null-ness in initializeFields() before overwriting a field.
2012-07-12 03:33:01 -07:00
Patrik Burkhalter b64e24691b Properly getting fields in initializeFields() 2012-07-12 09:33:37 +02:00
Patrik Burkhalter a97377bb4a Merge remote branch 'upstream/master' 2012-07-12 09:12:16 +02:00
Daniel Doubrovkine (dB.) b661a7ecbd Update master 2012-07-12 01:53:27 -03:00
Daniel Doubrovkine (dB.) 2f3807d9a4 Merge pull request #96 from trejkaz/master
Fixing crash in Netapi32Util (or anyone who calls DsEnumerateDomainTrusts)
2012-07-11 21:31:56 -07:00
Trejkaz (pen name) 9932ce345e Updating changelog for my fixes 2012-07-12 14:05:01 +10:00
Trejkaz (pen name) b254399c02 NetApiBufferFree was freeing the pointer we were passing in rather than the pointer to what DsEnumerateDomainTrusts allocated. 2012-07-12 14:00:28 +10:00
Trejkaz (pen name) 5c08bfcd5c Some DS_DOMAIN_TRUSTS fields were mapping ULONG to NativeLong instead of int. 2012-07-12 11:09:24 +10:00
Trejkaz (pen name) fcd4cafe8a Second attempt at fixing the crash in Netapi32Util.
This time we change the definition of Netapi32.DsEnumerateDomainTrusts. Crash is still not happening and this fix is more likely to be correct.
2012-07-12 09:02:44 +10:00
Trejkaz (pen name) cd6a1f48c8 Merge branch 'master' of https://github.com/twall/jna 2012-07-12 08:38:16 +10:00
Patrik Burkhalter 2996d99914 Test for null on fields in initializeFields(). 2012-07-11 16:38:53 +02:00
Timothy Wall 785173f106 Avoid overwriting string fields within structures when unnecessary; fix failing direct mode tests 2012-07-10 07:30:53 -04:00
Trejkaz (pen name) bf66cb55d6 Fixing a crash when trying to free the wrong pointer in Netapi32Util. 2012-07-10 15:56:15 +10:00
Daniel Doubrovkine (dB.) 9ce2f894c3 Update master 2012-07-09 19:59:12 -03:00
Daniel Doubrovkine (dB.) 436e842faa Update master 2012-07-09 19:58:59 -03:00
Daniel Doubrovkine (dB.) adf4a382a3 Update master 2012-07-09 12:53:10 -03:00
Daniel Doubrovkine d4ba6b3575 Updated CHANGES. 2012-07-09 11:49:53 -04:00
Daniel Doubrovkine 6439e36464 Fix: platform.win32.Secur32.AcquireCredentialsHandle, InitializeSecurityContext and AcceptSecurityContext. 2012-07-09 11:49:10 -04:00
Timothy Wall 57ded8d803 android tweaks 2012-07-09 07:39:10 -04:00
Timothy Wall aa5fc9b3d8 tweak resource path for android 2012-07-09 07:14:54 -04:00
Reini Urban 6d6f711080 cygwin/mingw shared libs need libtool LDFLAGS = -no-undefined
otherwise only static libs are created.
2012-07-07 12:52:02 -05:00
Timothy Wall afb3a7cc84 fix path to strip 2012-07-06 17:25:00 -04:00
Timothy Wall e14201201d remove superflous section marker 2012-06-26 21:15:31 -04:00
Timothy Wall 92b5085dd8 remove superflous section marker 2012-06-26 21:14:44 -04:00
Timothy Wall 4c814e7700 auto-sync memory for struct** arguments, add tests 2012-06-24 15:17:05 -04:00
twall fb6d9e6908 !@#$% magic links 2012-06-13 08:25:40 -03:00
twall 1398a5764b fix download links 2012-06-13 08:24:17 -03:00
twall e66bea10d4 Update master 2012-06-12 08:28:08 -03:00
twall 8ba666dfe0 Update master 2012-06-12 08:19:17 -03:00
twall 882bd3dd11 Update master 2012-06-12 08:14:54 -03:00
twall 317d41e1df Update master 2012-06-12 08:13:26 -03:00
twall 02bd142758 Update master 2012-06-12 08:00:18 -03:00
Daniel Doubrovkine 5f2620944f Made prettier. 2012-06-09 16:37:56 -04:00
Daniel Doubrovkine 0405f305f9 Updated changelog. 2012-06-09 16:37:09 -04:00
Daniel Doubrovkine 501dc9054a Fix: #78 NPE platform.win32.Netapi32Util.getDomainTrusts. 2012-06-09 16:33:07 -04:00
Timothy Wall b2c3c585db bump version 2012-06-08 09:27:55 -04:00
Timothy Wall 481010d0b3 Merge branch 'master' of github.com:twall/jna 2012-06-08 09:26:58 -04:00
Timothy Wall 4f79bd12e1 fix javadoc error 2012-06-08 09:26:36 -04:00
Timothy Wall 0bfd959bcb fix OSGI entries (closes issue #71 and issue #63) 2012-06-08 09:26:16 -04:00
twall d7845899b4 update javadoc links 2012-06-06 22:39:41 -03:00
Timothy Wall 307bf2600b update jar files 2012-06-06 21:25:30 -04:00
Timothy Wall 04f7f25563 update file download links 2012-06-06 21:22:01 -04:00
twall de33b60d87 Make javadoc more prominent. 2012-05-31 10:54:15 -03:00
twall 6e0914b1c9 Add link to dependency walker 2012-05-24 12:20:05 -03:00
twall f7f4b349e9 fix site doc link 2012-05-24 12:17:45 -03:00
twall 3c2f3115e0 add links to type mapping pages 2012-05-24 12:14:17 -03:00
twall 2df1b3675c add link to jnaerator 2012-05-24 12:09:15 -03:00
Timothy Wall 76f7b189fa add closures patch from auris 2012-05-22 08:13:17 -04:00
Daniel Doubrovkine 8c2d495e1c Updated CHANGES with SID and Netapi32Util.getUserInfo fixes. 2012-05-15 08:02:05 -04:00
Daniel Doubrovkine 42c9dea2c2 Updated tests: skip when not joined to a DC and check returned SID. 2012-05-15 07:44:36 -04:00
Daniel Doubrovkine c52599b6d9 Merge branch 'master' of github.com:twall/jna into trejkaz 2012-05-15 07:43:41 -04:00
Daniel Doubrovkine (dB.) ec90593be8 Merge pull request #74 from trejkaz/master
Fixing Netapi32Util.getUserInfo(String, String)
2012-05-15 04:43:27 -07:00
Daniel Doubrovkine 382d0098af Merge branch 'master' of git://github.com/trejkaz/jna into trejkaz 2012-05-15 07:31:15 -04:00
Trejkaz (pen name) 4c14dddec3 Commenting out Netapi32UtilTest.testGetUserInfo
The default behaviour of getUserInfo() in the absence of a domain name seems to be to fail, but this
was already occurring without my fix.
2012-05-15 16:32:24 +10:00
Trejkaz c2ce8be50f Tests for Netspi32Util.getUserInfo 2012-05-15 07:44:24 +10:00
Trejkaz a7717e5933 Ignore .DS_Store metadata files 2012-05-15 07:44:07 +10:00
Trejkaz (pen name) 9b255071f2 Make Netapi32Utils.getUserInfo(String,String) work.
Netapi32Utils.getUserInfo was ignoring the parameter for the domain name, which caused it to fail when the "domain" name was not actually a domain controller.

On fixing that, I got an error about the SID being in an invalid format. It seems like JNA's "PSID" is actually just the SID, so to get PSID you have to use "PSID.ByReference".
 This is bound to confuse someone else in the future so it might be worth renaming PSID to SID?
2012-05-14 12:39:25 +10:00
Daniel Doubrovkine (dB.) 70bb54e13f Merge pull request #73 from trejkaz/master
Making fields on USER_INFO_23 public
2012-05-13 18:10:18 -07:00
Trejkaz (pen name) 4461ca926c Making fields on USER_INFO_23 public so that it might actually be possible to use it 2012-05-14 10:15:20 +10:00
Nicolas Lelong d330f19292 iOS build fixes. 2012-05-05 09:37:02 -04:00
Timothy Wall b14ccb8eab update jna.jar 2012-05-04 07:28:06 -04:00
Timothy Wall d873f6f6be add android binary 2012-05-04 07:27:25 -04:00
Timothy Wall 7f0d465e98 set all structure fields, add android as a recognized platform 2012-05-04 07:24:00 -04:00
Jesse Glick 7855615a9d FindBugs has some other suggestions about nested classes which could be static.
In the case of LayoutInfo, this is especially important because otherwise
the layoutInfo WeakHashMap leaks references (compare issue #40).
2012-05-03 17:12:40 -04:00
Timothy Wall 9889489355 successful compilation/link of android 2012-05-03 08:09:54 -04:00
Anthony Green 09b23cfc1d Update README with Blackfin/uClinux support 2012-04-27 08:29:48 -04:00
Anthony Green 213ed15c70 Add blackfin supprt from Alexandre Keunecke. 2012-04-27 01:34:15 -04:00
Jesse Glick 6f7ece8603 FindBugs points out that StructField could be static. 2012-04-20 18:31:38 -04:00
Jesse Glick 5d44e011b9 API error in Structure.getFieldTypeInfo: StructField is not accessible outside this package,
so the method could not possibly be overridden outside it either.
Revealed by SigTest run on JNA 3.4.0:
Hidden class found: com.sun.jna.Structure$StructField in method protected com.sun.jna.Pointer com.sun.jna.Structure.getFieldTypeInfo(com.sun.jna.Structure$StructField) in class com.sun.jna.Structure
2012-04-20 18:29:04 -04:00
twall 0a190774b4 Add link to javadoc overview. 2012-04-12 13:19:40 -03:00
Anthony Green ff3d76fd42 3.0.11 2012-04-11 23:16:48 -04:00
Anthony Green 7e0a412c4f Update files to ship 2012-04-11 22:47:44 -04:00
Zachary Waldowski 39e6a58604 More mac/ios build improvements 2012-04-11 22:39:46 -04:00
Anthony Green 853cc722a1 Fix typo for darwin targets 2012-04-10 06:33:33 -04:00
Anthony Green 3f5023068c mend 2012-04-06 20:34:51 -04:00
Mike Lewis ebb8e89456 Build iOS library with xcode 2012-04-06 20:02:08 -04:00
Anthony Green a098b44f4c Reapply missing testsuite changes for arm 2012-04-06 17:04:35 -04:00
Anthony Green 10d1e51393 Update to rc4. Upgrade autoconf version. 2012-04-06 11:58:33 -04:00
Anthony Green 9bcc884276 Fix Linux/x32 reference in README 2012-04-06 11:53:07 -04:00
Anthony Green a044a56b1c Linux/x32 libtool fix 2012-04-06 10:39:10 -04:00
Anthony Green 59bb61a366 Update libtool version, README, tests dists 2012-04-06 08:26:14 -04:00
Anthony Green f2981454cb Revert debug code changes 2012-04-05 15:45:19 -04:00
Zachary Waldowski 39dccddb60 Fix building with Clang for Darwin (OS X 10.6+ and iOS
4.0+)
2012-04-05 12:32:41 -04:00
Peter Rosin 3afaa9a34a Fix return_uc.c test case on windows. 2012-04-03 07:40:31 -04:00
Anthony Green 65f40c35a2 Repair ppc build regression. 2012-04-03 07:35:59 -04:00
Peter Rosin 0a1ab12a8d Various MSVC-related changes. 2012-03-30 08:14:08 -04:00
Anthony Green e1539266e6 ARM VFP fix for old toolchains 2012-03-30 00:40:18 -04:00
Anthony Green 7c5e60b5f4 Rebase on fixed GCC sources 2012-03-29 08:48:22 -04:00
Anthony Green e72ed5eeaa Fix vararg float test 2012-03-21 09:52:28 -04:00
Anthony Green bd78c9c331 More cygwin fixes 2012-03-21 08:09:30 -04:00
Anthony Green 84d3253f86 Rebase post GCC merge 2012-03-19 23:07:35 -04:00
twall a09b116a9c Merge pull request #58 from tivv/master
JNA initialization fails with PermissionDenied
2012-03-19 07:52:44 -07:00
twall f351facdf4 Merge pull request #59 from SitChenNam/master
JNA port for AIX PowerPC
2012-03-19 07:46:55 -07:00
Vitalii Tymchyshyn 2143c18459 Fix for permission denied 2012-03-12 14:03:19 +02:00
SIT chen nam 8c0df63844 JNA AIX port on PowerPC
distribuable binary.
2012-03-12 12:00:25 +01:00
SIT chen nam 121430dac1 JNA port for AIX on PowerPC
The port has been made with GCC v4.6.2 on AIX 6.1 PowerPC.
Both aix-ppc and aix-ppc64 have been generated.

All JUNIT test runs successfuly, except DirectTest.registerMethod(),
because the standard /usr/libm.a is a static library.
You can install GCC libmpc.so.2 for AIX, and use it instead of libm.a, if
you want to run this test.
2012-03-12 11:53:30 +01:00
SIT chen nam 71163d3b9a FIX libffi (aix) error.
aix_closure.S: Invalid computed offset for register r3, wchen returning
from ffi_closure_helper_DARWIN().

ffi_darwin.c: add missing "break;" in "case FFI_AIX:"
              return FFI_BAD_ABI when unknown ABI is encountered.
2012-03-12 11:40:00 +01:00
Anthony Green 964c5b93f8 abi check fixes and Linux/x32 support 2012-03-03 14:46:20 -05:00
Anthony Green 6c194233a5 Add -no-undefined for both 32- and 64-bit x86
windows-like hosts.
2012-03-03 14:17:54 -05:00
Anthony Green 8360bf1cd0 Ensure that users don't include ffitarget.h directly 2012-02-23 07:01:13 -05:00
Daniel Doubrovkine (dB.) 3c916775ee Merge pull request #55 from joval/master
Some fixes and additions
2012-02-22 15:22:47 -08:00
David A. Solin 5ba54ed055 Note changes to log. 2012-02-21 19:24:19 -06:00
David A. Solin bd5b7fb376 Improved fix for empty string array registry types. 2012-02-21 14:30:41 -06:00
David A. Solin 05ed5c68bf Post-merge fixes. 2012-02-20 16:56:27 -06:00
David A. Solin b8dd54f99b Merge remote-tracking branch 'upstream/master'
Conflicts:
	contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java
2012-02-20 16:21:14 -06:00
Daniel Doubrovkine (dB.) e20d384f9d Merge pull request #54 from chatellier/master
Add to platform.win32.User32 : GetLastInputInfo
2012-02-20 13:51:22 -08:00
David A. Solin bd63a56975 MULTI_SZ registry values take the form String1\0String2\0\0. The final \0 does not mean that there is a String3, but signals the termination of the value. This commit corrects the misinterpretation, making it possible for JNA to correctly retrieve MULTI_SZ values. 2012-02-20 13:58:16 -06:00
Anthony Green d578b89619 Fix ABI check regression 2012-02-15 00:18:18 -05:00
Eric Chatellier 1f10720f6e Fix code style and update CHANGES.md 2012-02-14 16:07:09 +01:00
Eric Chatellier 1ef26f6227 Remove useless import 2012-02-14 11:31:49 +01:00
Eric Chatellier 7d59645a67 Add to platform.win32.User32 : GetLastInputInfo 2012-02-14 09:56:55 +01:00
Anthony Green dee20f8e45 Rebased from gcc 2012-02-10 13:06:46 -05:00
Eric Chatellier 70e7b8f1f9 Add to platform.win32.User32 : GetLastInputInfo 2012-02-09 16:57:51 +01:00
Eric Chatellier 9e9b898452 Add to platform.win32.User32 : GetLastInputInfo 2012-02-09 15:57:55 +01:00
Anthony Green 4130e1972d Refresh autoconf-archive m4 scripts 2012-02-03 13:18:27 -06:00
Anthony Green 1ff9c604bb Rebase from GCC 2012-02-01 16:34:30 -06:00
Timothy Wall 00e3608c54 Clarify some javadoc 2012-01-29 12:57:11 -05:00
David A. Solin af6bd86757 Added GetDriveType. 2012-01-27 15:43:52 -06:00
David A. Solin 0952ce45c1 Added support for GetFileType. 2012-01-27 11:49:56 -06:00
Timothy Wall 040e67b637 bump version 2012-01-27 09:46:39 -05:00
Timothy Wall cd6fe24df5 update platform jar 2012-01-27 09:43:57 -05:00
Timothy Wall 42d2fb8607 Merge branch 'master' of github.com:twall/jna 2012-01-27 09:37:10 -05:00
Timothy Wall 241028bbd8 link linux x86/amd64 against older glibc versions (2.1.3 and 2.2.5 respectively) 2012-01-27 09:36:47 -05:00
Timothy Wall 0c58f7cb59 revise comment for accuracy 2012-01-27 09:19:06 -05:00
twall 47887c1d95 Merge pull request #50 from biggunbenny/master
Pull request on issue #49 as requested.  Properly read native data on first entry of array of printer info structs.
2012-01-24 08:14:03 -08:00
Anthony Green 211060eb8f Alpha fix 2012-01-23 14:24:01 -05:00
Anthony Green 78d9c638ba mend 2012-01-23 14:17:24 -05:00
Anthony Green afaf338160 mend 2012-01-23 14:17:13 -05:00
Anthony Green 9e9c4aeb77 Add Amiga support 2012-01-23 14:11:23 -05:00
Anthony Green 8efc0b1f40 Unlikely fixes 2012-01-23 13:47:38 -05:00
Anthony Green 1df51398ae mend 2012-01-23 13:43:59 -05:00
Anthony Green cd2277cc79 mend 2012-01-23 13:43:38 -05:00
Anthony Green 164e6fe04b m68k fixes 2012-01-23 12:41:06 -05:00
Anthony Green c365ee7577 Refresh 2012-01-23 11:13:18 -05:00
unknown cbc16d2a48 Fixed bug in WinspoolUtil.getPrinterInfo1() and WinspoolUtil.getPrinterInfo4() where the first element's fields was never populated 2012-01-18 09:18:24 +01:00
Timothy Wall 636b01b95c fix pom update path, maven javadoc path 2011-12-24 08:49:11 -05:00
Timothy Wall 41683e76bb don't delete 'dist' dir on clean 2011-12-23 22:52:55 -05:00
Timothy Wall 4030e1c015 use -mno-cygwin only on gcc < 4 2011-12-23 11:00:33 -05:00
Timothy Wall db6a8e7cda remove inadvertent build directory override 2011-12-22 18:08:16 -05:00
Kristian Rosenvold dd93afa50e Made build work clean as well 2011-12-21 23:25:20 +01:00
Kristian Rosenvold 822d49087b Maven central deployment 2011-12-21 22:50:59 +01:00
twall e463de8cc8 from Guillaume Cottenceau <gcottenc_AT_gmail_DOT_com> 2011-12-21 14:40:01 -05:00
twall 0c060dbaaa Merge pull request #40 from jglick/master
Accepted fix for memory leak
2011-12-14 07:15:56 -08:00
Timothy Wall 0fec165454 remove superfluous javah headers 2011-12-14 10:08:29 -05:00
Timothy Wall 504460458c ensure consistent JNI checksum 2011-12-14 09:36:22 -05:00
Timothy Wall 2fba190dde Merge branch 'master' of github.com:twall/jna 2011-12-12 09:41:25 -05:00
Timothy Wall b8fb3290b2 Allow for 'unsigned' IntegerType 2011-12-12 09:41:04 -05:00
David A. Solin 2e0c0a670f Fixed exception thrown when querying for the existence of a REG_QWORD. 2011-12-07 09:16:32 -06:00
Jesse Glick 9473f51d7b "Leaking WeakHashMap" canned analysis from NB Profiler turns up:
NativeMappedConverter.converters: java.util.WeakHashMap#116 is wrong: key java.lang.Class#5600 is reachable from value com.sun.jna.NativeMappedConverter#3
Indeed the value type strongly refers to the key type so a WeakHashMap is a potentially major memory leak.
Since Java lacks ephemerons, need to either eliminate the cache, or make the values be soft references.
2011-12-05 18:50:37 -05:00
Jesse Glick de857048a2 Merge branch 'master' of https://github.com/twall/jna 2011-12-05 18:36:24 -05:00
twall 83ec260e09 fix list formatting 2011-12-02 16:24:35 -05:00
Timothy Wall cbf8b37734 fix javadoc comment for field ordering 2011-12-01 13:52:43 -05:00
Timothy Wall e81f46ecf5 update download references 2011-11-26 08:53:53 -05:00
Timothy Wall c2089f5275 update download references 2011-11-26 08:53:09 -05:00
Timothy Wall e9da3c61c1 update jars for 3.4.0 2011-11-26 08:17:49 -05:00
Timothy Wall 01ff3f1d86 fix keyhook demo jar generation 2011-11-23 13:49:00 -05:00
Timothy Wall 931deeef94 fix javadoc warnings, move interface method definitions to WinNT from WinBase 2011-11-23 12:34:36 -05:00
Timothy Wall 5caa17a994 Separate NIO buffer mappings between Kernel32 and CoreDLL 2011-11-23 11:58:48 -05:00
Timothy Wall ecbfaa4b2d fix shell32 alignment on win64 2011-11-23 11:50:25 -05:00
Timothy Wall 0d273fefc6 fix keyhook build 2011-11-23 11:44:01 -05:00
Timothy Wall 9c4232b6e2 clean up w32 platform sources 2011-11-23 10:01:03 -05:00
Timothy Wall 79c2aaaebb correct mappings causing failure on win64 2011-11-23 09:36:45 -05:00
Timothy Wall 7141c7a612 Merge branch 'master' of github.com:twall/jna 2011-11-22 11:02:33 -05:00
Timothy Wall cd420e3e33 update docs 2011-11-22 10:24:05 -05:00
Timothy Wall ef2cc89023 fix build using mingw64 2011-11-21 14:58:56 -05:00
Timothy Wall 2beeabb17b fix struct layout cacheing in Union 2011-11-21 10:50:19 -05:00
Timothy Wall d83dde09a7 Merge branch 'master' of github.com:twall/jna 2011-11-19 11:43:19 -05:00
Timothy Wall 3ca38481c7 cache structure layout results 2011-11-19 11:41:10 -05:00
twall 288a5157be Merge pull request #38 from joval/master
Changes logged to CHANGES.md
2011-11-18 15:44:51 -08:00
David A. Solin f5bde32616 Changes logged to CHANGES.md 2011-11-18 17:14:21 -06:00
Timothy Wall bffbc30c3d Merge branch 'master' of github.com:twall/jna 2011-11-18 17:38:28 -05:00
Timothy Wall 9ca125ddc4 fix/cleanup platform tests 2011-11-18 17:29:12 -05:00
Timothy Wall df2721c0ce Implement mac move to trash 2011-11-18 17:13:38 -05:00
Anthony Green f22c38bbd9 Update variadic patch 2011-11-18 15:13:41 -05:00
Anthony Green 03e9ee321a Fix cls_double_va.c and update docs 2011-11-18 15:13:00 -05:00
David A. Solin 961e41be26 Additional changes per twall 2011-11-18 13:17:14 -06:00
David A. Solin 1332fbbcb0 Additional changes per twall 2011-11-17 20:30:41 -06:00
David A. Solin 8325f7cd82 Merge remote-tracking branch 'upstream/master' 2011-11-16 16:06:33 -06:00
David A. Solin 86f7b9788d File security and registry QWORD changes merged by samuel-aubin. 2011-11-16 16:02:53 -06:00
Timothy Wall b23411bc2b update w32 native 2011-11-15 11:22:44 -05:00
Timothy Wall 7c43abaf4e include error string in LastErrorException, if available, update wince native 2011-11-15 10:30:36 -05:00
Timothy Wall d7c106d08b fix JIRA issue 188 2011-11-14 13:48:54 -05:00
Anthony Green 95f31151ec Rerun automake 2011-11-12 23:46:05 -05:00
Anthony Green 198ed1ef85 Update version number 2011-11-12 23:45:20 -05:00
Anthony Green 4f17e1f142 Fix last patch 2011-11-12 17:22:24 -05:00
Anthony Green ff9454da44 Add David Gilbert's variadic function call support 2011-11-12 17:18:51 -05:00
Anthony Green ea14ae85e8 clean up 2011-11-12 16:36:59 -05:00
Anthony Green 52891f8a93 Add powerpc soft float support 2011-11-12 16:35:55 -05:00
Anthony Green c8f1bde8e2 Remove junk file 2011-11-12 16:21:02 -05:00
Anthony Green 6a6e7f862f Fix kfreebsd 2011-11-12 16:20:42 -05:00
Anthony Green d52fbed05c Add missing ChangeLog entry 2011-11-12 16:13:41 -05:00
Anthony Green 322052ce65 Fix arm wince alignment issue 2011-11-12 16:11:49 -05:00
Anthony Green af18df2bc2 Remove use of ppc string instructions 2011-11-12 15:52:08 -05:00
Anthony Green 236c939132 Fix darwin11 build problem 2011-11-12 07:37:40 -05:00
Anthony Green c411f140f3 Fix ax_enable_builddir macro on BSD systems 2011-11-12 07:32:36 -05:00
Anthony Green 3d56106b07 Rebase 2011-11-12 07:20:24 -05:00
Timothy Wall fdf9bbcc31 fix bug with aliasing buffers in Memory ByteBuffer tracking 2011-11-11 08:38:57 -05:00
Timothy Wall 65385d2ac6 v3.4.0rc all natives updated 2011-11-09 16:28:59 -05:00
Timothy Wall 133d956592 Merge branch 'master' of github.com:twall/jna 2011-11-09 13:13:48 -08:00
Timothy Wall 245dcb0f4a enable ppc builds on ppc64 2011-11-09 13:13:12 -08:00
Timothy Wall 6b19aa7ec9 avoid attempts to write to final fields on J2ME 2011-11-09 09:47:51 -05:00
Timothy Wall c5cbdbb1e8 rebuild for wince target 2011-11-09 08:56:40 -05:00
Timothy Wall cbf16d3f82 fix 2 failing w32ce tests 2011-11-09 08:46:53 -05:00
Timothy Wall df6ab34e5b Merge branch 'master' of github.com:twall/jna 2011-11-09 07:56:50 -05:00
Timothy Wall 816317b8a6 re-enable WCE failing tests, fixes to allow proper phoneME operation w/r/t AWT classes 2011-11-09 07:30:18 -05:00
Timothy Wall 521aa2dad0 don't set LD_PRELOAD if libjsig is unavailable 2011-11-07 16:30:52 -05:00
Timothy Wall 6e439ca778 fix compiler longjmp warnings in getChar/setChar 2011-11-07 11:02:25 -05:00
Timothy Wall d66e9e98b7 avoid crash with really long strings 2011-11-07 09:15:14 -05:00
Timothy Wall a3994e009d update sunos-x86/amd64 natives 2011-11-05 08:33:48 -04:00
Timothy Wall 062afd1773 fix contrib test runs on win64 2011-11-04 11:38:43 -04:00
Timothy Wall 8d2d8086b1 add linux x86/amd64 natives, w64 native, fix w64 compiler warnings 2011-11-04 09:18:31 -04:00
Timothy Wall cf71299f3b Merge branch 'master' of github.com:twall/jna 2011-11-03 11:00:31 -04:00
Timothy Wall 36dad4738a update freebsd natives 2011-11-03 11:00:03 -04:00
Timothy Wall fb744c65bd update sparc natives 2011-11-03 10:58:23 -04:00
Timothy Wall a9949b3fe0 update win32-x86 native 2011-11-03 10:14:32 -04:00
Timothy Wall a72d5b473b update linux-arm native 2011-11-03 13:56:58 +00:00
Timothy Wall 201931d2f8 update linux-ia64 native 2011-11-03 14:28:13 +01:00
Timothy Wall c58c5260a0 fix clobber warning 2011-11-03 09:08:14 -04:00
Timothy Wall e25dcd7c5f update osx/darwin native 2011-11-03 08:55:36 -04:00
Timothy Wall 04e36d1560 merge wince branch into master 2011-11-03 08:53:33 -04:00
Timothy Wall 681e840d97 add osgi for linux-ia64 2011-11-02 22:05:35 -04:00
Timothy Wall 59b44d532c rebuild ia64-linux 2011-11-03 03:03:26 +01:00
Timothy Wall 04a6806957 remove redundant src in javac 2011-11-02 18:56:04 -07:00
Timothy Wall 6041c067a5 incorporate linux-arm|ppc|ppc64 natives into main 2011-11-02 21:46:58 -04:00
Timothy Wall 9b9e6510ac build linux-ppc64 2011-11-02 18:42:53 -07:00
Timothy Wall 489d797df5 update note on winCE 2011-11-02 18:39:48 -04:00
Timothy Wall 9df51dd4d8 add change note for w32ce-arm 2011-11-02 16:41:46 -04:00
Timothy Wall 6ffbf31eda down to two failing tests on w32ce-arm 2011-11-02 16:37:43 -04:00
Timothy Wall 7ea92aa923 ensure separated buffer tests still work 2011-11-02 15:34:45 -04:00
Timothy Wall 1d481a7050 remove redundant message 2011-10-28 09:34:19 -04:00
Timothy Wall 76781972a2 update change log, account for NIO buffer position 2011-10-28 09:31:53 -04:00
Timothy Wall 2953b46a3c use Buffer position when it's backed by an array 2011-10-28 08:25:58 -04:00
Timothy Wall aae0c47f5c Merge branch 'master', remote-tracking branch 'origin' into wince 2011-10-27 15:22:25 -04:00
Timothy Wall 6d83a71bdd update natives (osx) 2011-10-27 13:03:40 -04:00
Timothy Wall 7b515a7dc8 merge master ARM changes into wince branch 2011-10-27 13:00:57 -04:00
Timothy Wall 8c06f5762f structure alignment fixes for ARM 2011-10-27 16:45:38 +00:00
Timothy Wall 1d96ae4ab2 fix missing import 2011-10-19 21:24:02 -04:00
Timothy Wall c1b875ff38 Merge branch 'wince' of github.com:twall/jna into wince 2011-10-19 20:34:38 -04:00
Timothy Wall 5b15ee4ae3 Merge branch 'master' of github.com:twall/jna into wince 2011-10-19 20:34:29 -04:00
Timothy Wall 92d3c433c4 Add a little explanatory info to balloon tips demo 2011-10-19 20:33:31 -04:00
Timothy Wall 79ff2f7a93 Merge branch 'master' of github.com:twall/jna 2011-10-19 20:32:57 -04:00
Timothy Wall b78618dca1 add wince basic mapping to platform.jar 2011-10-19 20:32:06 -04:00
Timothy Wall 0967615734 add wince basic mapping to platform.jar 2011-10-19 20:31:58 -04:00
twall 9eb51ebaba Update README.md 2011-10-17 15:20:59 -03:00
Timothy Wall d9c887c0d4 Merge branch 'master' of github.com:twall/jna 2011-10-12 09:40:14 -04:00
Timothy Wall 6e6d761f2b Merge branch callback-threads into master 2011-10-12 09:36:50 -04:00
Timothy Wall 7865bb46ad fix signal chaining link 2011-10-11 12:27:01 -04:00
Timothy Wall c6ad9adbe0 Boolean.parseBoolean not available on wce 2011-10-11 12:23:51 -04:00
Timothy Wall 907e2eb411 add docs for lasterror, fix last error failure 2011-10-11 12:09:25 -04:00
Timothy Wall e1ed265df7 all direct tests pass 2011-10-11 11:35:27 -04:00
Timothy Wall 1466833fb7 fixed tests related to 64-bit alignment 2011-10-11 09:39:24 -04:00
Timothy Wall ebf08cfede update docs re: JNA loading 2011-10-11 09:38:58 -04:00
Timothy Wall fc703cadb8 strip and explicitly link 2011-10-11 09:03:22 -04:00
Timothy Wall bb69e3d099 fix errors in libffi build 2011-10-11 08:46:13 -04:00
Timothy Wall 08e6f64a64 copy native bits *before* generating full jar file 2011-10-10 18:54:14 -04:00
Timothy Wall d9193f4442 fix more tests 2011-10-10 18:39:35 -04:00
Timothy Wall e658538926 fix some more failing tests 2011-10-10 17:00:33 -04:00
Timothy Wall b55b60cff4 fix load from current module 2011-10-10 14:57:21 -04:00
Timothy Wall ac272df5d3 down to 24 failures (4 crashes) on w32ce-arm 2011-10-10 14:40:16 -04:00
Timothy Wall b61e701298 NativeTest passes 2011-10-10 11:45:42 -04:00
Timothy Wall 7e2f27fe42 w32ce-arm library load on wince 5 (WM6.1) 2011-10-10 09:04:52 -04:00
Timothy Wall 078763cb92 Merge branch 'master' of github.com:twall/jna into callback-threads 2011-10-06 09:25:17 -04:00
Timothy Wall 2f66bb2b77 use default vm attach options 2011-10-06 09:24:42 -04:00
Timothy Wall b3de77c961 bump native version 2011-10-06 09:17:16 -04:00
Timothy Wall 60184e16f5 remove debug output 2011-10-05 19:35:50 -04:00
Timothy Wall 3e71e6cb3e Merge branch 'master' of github.com:twall/jna into callback-threads 2011-10-05 19:33:13 -04:00
Timothy Wall f0b5b01a5f avoid negative interactions with system install of JNA 2011-10-05 17:30:52 -04:00
Timothy Wall 877af01713 add direct method declaration in callbacks test 2011-09-30 16:11:24 -04:00
Timothy Wall 39ce53e6c9 clean up before merge 2011-09-30 10:47:43 -04:00
Timothy Wall 3d60203509 Merge branch 'master' of github.com:twall/jna into callback-threads 2011-09-22 11:54:22 -04:00
Timothy Wall ed3da68670 Merge branch 'master' of github.com:twall/jna 2011-09-22 11:53:38 -04:00
Timothy Wall a0cf56bdac Clean up javadoc parameters 2011-09-22 11:53:09 -04:00
Jesse Glick 26b8fad3c1 Merge branch 'master' of https://github.com/twall/jna 2011-09-21 17:36:21 -04:00
twall 6f9c712b22 Add link to JNAerator. 2011-09-14 10:31:54 -03:00
twall b95bcb2b63 Note existence of Pointer(long) ctor 2011-09-14 10:25:45 -03:00
twall 67fb8d11c2 Merge pull request #27 from bhamail/macPPC
1.5-level source compliance (Mac ppc) (via branch)
2011-09-13 04:34:32 -07:00
Timothy Wall e1f846df99 Fix default ABI used in prep_cif call 2011-09-12 09:12:51 -04:00
Dan Rollo b8cba40e84 change javac source/target props from 1.6 to 1.5 (allows build on mac ppc). 2011-09-10 16:15:13 -04:00
Dan Rollo 0d9dede3c4 comment out Override annotation to be 1.5 compliant. 2011-09-10 15:49:58 -04:00
Timothy Wall bb2888f670 remove tmp files 2011-09-10 11:42:39 -04:00
Timothy Wall 1cb727a62a enable callback threads on windows 2011-09-10 11:41:49 -04:00
Timothy Wall 77419e2808 clean up 2011-09-10 08:47:08 -04:00
Timothy Wall 6b42585e82 Merge branch 'master' of github.com:twall/jna into callback-threads 2011-09-09 10:25:39 -04:00
Timothy Wall 2841c3aaf1 functional detach switch from callback 2011-09-09 10:17:30 -04:00
Timothy Wall 72871bbd4c Merge branch 'master' of github.com:twall/jna 2011-09-09 07:38:18 -04:00
Timothy Wall 697e024936 fix javadoc link 2011-09-09 07:38:02 -04:00
Anthony Green 8c01954c50 Build assembly files with debug info 2011-09-06 14:26:32 -04:00
Jesse Glick c7603bffa8 Ignore the doc directory; it is a build product. 2011-09-06 14:25:44 -04:00
twall 366296743b Merge pull request #26 from jglick/master
Pull request #22 cleanup
2011-09-06 10:34:19 -07:00
Jesse Glick a48f90067e Removing stray references to nbproject. 2011-09-06 12:08:41 -04:00
twall 8e6b046ee0 Merge pull request #22 from jglick/master
Sundry build script fixes
2011-09-06 07:41:08 -07:00
Anthony Green fed646a207 Regenerate configury with missing m4 macros 2011-09-06 09:50:20 -04:00
Anthony Green d76441cf71 Update list of supported OpenBSD systems 2011-08-24 10:14:23 -04:00
Anthony Green ee6696fdf4 3.0.11-rc1. soname bump. 2011-08-23 12:30:29 -04:00
Anthony Green c6265c36a9 Version 3.0.10 2011-08-23 10:31:33 -04:00
Anthony Green cc5e41bf32 Fix use of autoconf macros 2011-08-22 16:34:24 -04:00
Anthony Green 049d8386ff Many new patches 2011-08-22 14:50:10 -04:00
Jesse Glick af9c4e6cb9 Pass jna.builddir as an absolute path.
Otherwise various tests fail when the CWD used to invoke Ant is not the project basedir.
2011-08-16 13:26:34 -04:00
Jesse Glick 1af26d22fd <sysproperty key="k" value="v"/> more natural than <jvmarg value="-Dk=v"/>. 2011-08-16 12:34:28 -04:00
Jesse Glick f9c9e0ef41 <formatter type="brief" usefile="false"/> has similar command-line behavior to printsummary="yes" but allows Ant listeners like NetBeans to track progress. 2011-08-16 12:14:04 -04:00
Jesse Glick 06060b7dff Should specify tempdir prop to <junit> so as not to pollute versioned dir with junit*.properties after aborted tests. 2011-08-16 12:07:50 -04:00
Jesse Glick 6b9d964e36 Correcting confused paths: classpaths should not include source roots. 2011-08-16 11:47:13 -04:00
Jesse Glick 43752710f8 Move misleading project metadata out of the way.
Should be friendlier to the NetBeans IDE.

1. A project should not have a "pom.xml" at top level (or preferably anywhere)
   unless it is really a Maven-based project and pom.xml gives all relevant
   information about the sources, which is certainly not the case here.

2. nbproject/project.xml was that of an IDE-managed project, which is
   inappropriate here where there is a complex build.xml that does not (and
   cannot) conform to the expectations of that project type (e.g. different Java
   source levels for src/ and test/ dirs). Could use the "freeform" project type
   for such cases, but http://wiki.netbeans.org/AutomaticProjects should do just
   as well, with no IDE-specific metadata or administration.
2011-08-16 11:17:15 -04:00
Anthony Green 3b7efa4e74 Revert remove-debug-code patch temporarily (for ARM Fedora release) 2011-08-15 13:25:13 -04:00
Timothy Wall c397a0a4e3 add callback thread initializer 2011-08-11 15:45:13 -04:00
Timothy Wall 5a674bf44b Merge branch 'master' into callback-threads 2011-08-11 11:35:26 -04:00
Timothy Wall cea1743630 Merge branch 'master' of github.com:twall/jna 2011-08-11 11:34:20 -04:00
Timothy Wall 2666f05790 update .gitignore 2011-08-11 11:34:13 -04:00
Timothy Wall 53822961b9 update .gitignore 2011-08-11 11:33:19 -04:00
Timothy Wall 0574c76c4f add full native list for OSGI Bundle-NativeCode manifest attribute 2011-08-11 11:27:12 -04:00
twall 6941166a71 Fix JavaDoc warning 2011-08-11 12:02:56 -03:00
Timothy Wall 34ab92f0fb initial callback behavior flags setup and test harness 2011-08-11 09:51:21 -04:00
twall b5dbe3bb94 Added basic build instructions for w32/w64. 2011-08-09 12:31:58 -03:00
twall 542b9c47ed Merge pull request #19 from dblock/contributing
Added a contributing section and links to JavaDoc.
2011-08-08 06:59:41 -07:00
Timothy Wall bf6a58c9b7 fix reported file path for platform test results 2011-08-06 14:28:28 -04:00
Timothy Wall a7182710cc avoid deleting native library when it already exists as a file in the classpath 2011-08-06 14:26:12 -04:00
Timothy Wall cd238a0800 ensure temporary/unpacked files are marked for deletion; attempt deletion immediately after load 2011-08-06 13:39:46 -04:00
Timothy Wall 3e6f098b34 Add option to avoid automatic jar unpacking, with test 2011-08-06 10:21:22 -04:00
Timothy Wall 244dd4296b update jna website address 2011-08-06 10:20:47 -04:00
Timothy Wall c7ef8c3223 update main website in javadoc overview 2011-08-06 10:19:57 -04:00
Daniel Doubrovkine 34b5f2f206 Moved javadoc one level back. 2011-08-06 08:58:26 -04:00
Timothy Wall ae4c442077 fix incorrect comment 2011-08-05 18:08:21 -04:00
dblock 1da72d973d Reformatted. 2011-08-05 12:29:26 -04:00
dblock 8ef79fb6a6 Try without spaces. 2011-08-05 12:27:45 -04:00
dblock 15e8e58f67 Lets try again. 2011-08-05 12:27:10 -04:00
dblock c082e4813d One more tab. 2011-08-05 12:26:18 -04:00
dblock fc2c75c7df Added link to JavaDoc. 2011-08-05 12:24:52 -04:00
dblock d033c4c5a9 More contributing. 2011-08-05 12:22:25 -04:00
dblock 04e4a24664 Merge branch 'master' of github.com:twall/jna into contributing 2011-08-05 12:20:29 -04:00
Daniel Doubrovkine (dB.) 2a7ecd3847 Merge pull request #18 from dblock/javadoc
Regenerated 3.3.0 javadocs into www.
2011-08-05 09:20:06 -07:00
dblock 727c8a47d1 Updated Javadoc. 2011-08-05 12:09:54 -04:00
dblock 37630b17c3 Added contributing. 2011-08-05 12:07:49 -04:00
Anthony Green d992ac54a2 Refresh from GCC 2011-07-29 17:32:53 -04:00
Daniel Doubrovkine (dB.) 1ec856379d Merge pull request #15 from tulskiy/master
Mapping functions required for global hotkeys
2011-07-27 11:48:58 -07:00
tulskiy 8d43c5cabf Updated CHANGES.md with new functions for global hotkeys 2011-07-28 00:39:56 +06:00
Denis Tulskiy 0fae5813f6 [osx] added Carbon library mapping with functions required for global hotkeys functionality 2011-07-28 00:31:44 +06:00
Denis Tulskiy 62242cd708 [x11] added mappings to XGrabKey and XUngrabKey functions used for Global Hotkeys and XSetErrorHanler used to handle program errors without exiting 2011-07-28 00:31:43 +06:00
Denis Tulskiy 5c758d3baf [user32] added mappings to RegisterHotKey and UnregisterHotKey functions used for Global Hotkeys 2011-07-28 00:31:43 +06:00
Daniel Doubrovkine (dB.) 1f495f5fec Merge pull request #16 from tmyroadctfig/master
Updated changes.md as per code review comments.
2011-07-27 05:02:52 -07:00
Luke Quinane 9e6ebd4c8e Update changes.md - move new functions to correct sub-heading and expand the added list. 2011-07-27 09:12:53 +10:00
twall dd323edec4 Merge pull request #14 from bhamail/master
first attempt at a pull request...
2011-07-21 17:44:11 -07:00
Dan Rollo 53006d6ff4 replace non-UTF8 character 2011-07-21 19:51:51 -04:00
Daniel Doubrovkine (dB.) 94097d4656 Merge pull request #11 from tmyroadctfig/master
Code review changes.
2011-07-13 04:23:37 -07:00
Luke Quinane 033ef99663 Update changes.md. 2011-07-13 15:46:50 +10:00
Luke Quinane c82e2b01a4 Code review changes - remove ANSI comments and make all functions Unicode. 2011-07-12 08:58:52 +10:00
Luke Quinane b25bc96eb7 Code review changes - move some constants. 2011-07-12 08:47:13 +10:00
Timothy Wall 00c79242fe closes #10 2011-07-11 13:05:18 -04:00
Timothy Wall 46dac8226a Merge branch 'JNA-184' of https://github.com/kohsuke/jna into kohsuke-10 2011-07-11 12:42:49 -04:00
Daniel Doubrovkine (dB.) 8e919e7298 Merge pull request #2 from tmyroadctfig/master
Added some more Win32 platform calls.
2011-07-11 05:28:34 -07:00
Luke Quinane 499b115a01 Merge remote-tracking branch 'upstream/master' 2011-07-11 10:15:06 +10:00
Kohsuke Kawaguchi 75c0885a5b Integrating the fix for JNA-184 as submitted in http://java.net/jira/browse/JNA-184 2011-07-10 10:57:47 -07:00
Timothy Wall 1cec02f2d8 add linux/ppc failure notes 2011-07-08 09:23:54 -04:00
Timothy Wall b05e7835c6 add linux/ppc native 2011-07-08 15:22:30 +02:00
Timothy Wall 62201ceba0 fix structure alignment issues on linux/ppc 2011-07-08 14:32:54 +02:00
Timothy Wall 7d28dd8114 move osgi entries to the proper location 2011-07-08 07:32:08 -04:00
Luke Quinane 6d3f003133 Add version docs and test. 2011-07-08 10:11:33 +10:00
Luke Quinane 167d6bcbb7 Move more values into the correct Java file. 2011-07-07 11:19:54 +10:00
Luke Quinane fac681cfa2 Move another value into the correct Java file. 2011-07-07 11:11:30 +10:00
Luke Quinane a1643fcdc2 Move another value into the correct Java file. 2011-07-07 11:10:42 +10:00
Luke Quinane d1d7f2eb2b Add documentation for some more structures / values. 2011-07-07 11:05:06 +10:00
Luke Quinane 605ab234d7 Add documentation for the SetupApi interface. 2011-07-07 10:47:15 +10:00
Luke Quinane d10c7c922e Add tests and documentation for the MSI interface. Add some licence details to new files. 2011-07-07 10:10:31 +10:00
Luke Quinane 1c82657c0c Add unit tests for new kernel32 functions. Move out bits declared in other header files. 2011-07-06 14:53:09 +10:00
Luke Quinane a4a7faba40 Move new win32 structures into the correct Java files. Migrate new win32 interfaces still in the old project structure. 2011-07-06 13:31:28 +10:00
Luke Quinane ffa4cc6ac9 Merge remote-tracking branch 'upstream/master' 2011-07-06 12:44:52 +10:00
Timothy Wall 0cdc7ff542 use java.io.tmpdir as a fallback if can't create jna tmpdir 2011-06-23 10:07:25 -04:00
Timothy Wall 71de662675 revise temporary file cleanup on win32 2011-06-23 08:34:08 -04:00
Timothy Wall a18e453686 move jnalib up to top level 2011-06-22 07:34:11 -04:00
Daniel Doubrovkine (dB.) 6e99ab0184 Merge pull request #3 from notnoop/master
Correct the Callback documentation
2011-06-21 08:37:59 -07:00
notnoop 4b8d91084b correct C equivalence of Callback documentation 2011-06-21 15:29:57 +00:00
dblock ed900e2b31 Fixed link. 2011-06-20 08:14:19 -04:00
dblock e2e67eac9f Added links to download. 2011-06-20 08:13:39 -04:00
Luke Quinane 7ce94ed58e Restore original imports. 2011-06-20 11:34:33 +10:00
Luke Quinane 57d44c3c36 Revert some removed upstream changes. 2011-06-20 11:31:39 +10:00
Luke Quinane 3a86a62865 Whitespace fixes. 2011-06-20 11:27:56 +10:00
Luke Quinane 65d5d4303d Added some missing javadocs. 2011-06-20 11:20:52 +10:00
Luke Quinane 8d7256ef08 Whitespace fixes. 2011-06-20 11:20:38 +10:00
Luke Quinane fd16cfc67a Revert further duplicated changes. 2011-06-20 10:22:29 +10:00
Luke Quinane e7bd55637a Remove duplicated structures. 2011-06-20 10:11:57 +10:00
Luke Quinane 0f459174c8 Fix compilation errors. 2011-06-20 10:05:47 +10:00
Luke Quinane 1d19323026 Copy changes into Github checkout. 2011-06-20 09:29:58 +10:00
Timothy Wall ed1cc99506 update CHANGES with current version 2011-06-17 10:36:51 -04:00
twall f66cb26c58 Merge pull request #1 from dblock/master
Initial documentation in markdown format.
2011-06-17 07:30:49 -07:00
dblock 707412d1b6 Merge branch 'master' of github.com:twall/jna 2011-06-07 20:25:46 -04:00
dblock a7ebdc5453 Sync with svn, 3.3.0 release. 2011-06-07 20:22:40 -04:00
dblock dc35957f63 Updating revisions 1197 and 1998 from svn. 2011-05-30 15:30:38 -04:00
dblock 0711483bb7 Updated readme. 2011-05-23 11:26:05 -04:00
dblock f4f5ff1887 Fixed table. 2011-05-23 11:24:30 -04:00
dblock 33a4fa3203 Changes are in markdown format. 2011-05-23 11:20:46 -04:00
dblock 8b22412e55 The rest of the documentation. 2011-05-23 11:19:40 -04:00
dblock 92d721d9d0 Started porting docs into markdown. 2011-05-23 10:47:24 -04:00
dblock 0f06d0b8ce Added top-level build.xml. 2011-05-23 09:37:48 -04:00
dblock e321ec4c6f Updated classpaths to jnalib, default Eclipse import. 2011-05-23 09:13:09 -04:00
dblock 2f2892ff08 Updated classpaths to match default Eclipse import (jnalib). 2011-05-23 09:11:44 -04:00
dblock 1dd559e80e Added .gitignore. 2011-05-23 08:47:12 -04:00
Timothy Wall b7fb1b7e5a update sparc jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1196 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-05-17 14:24:16 +00:00
Timothy Wall eb60877793 update native jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1195 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-05-16 17:10:05 +00:00
Timothy Wall 5907ce0a02 import libffi 3.0.10-rc8
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1194 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-04-30 21:54:20 +00:00
Anthony Green 2d3fb36420 Fix darwin EH 2011-03-30 16:54:42 -04:00
Timothy Wall 5a1d431e51 fix javadoc warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1193 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-12 22:21:17 +00:00
Timothy Wall 0552c4a001 fix javadoc warning
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1192 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-12 22:20:48 +00:00
Timothy Wall 96d017869a move all native functions into Native class, reduce JNI crossings where possible
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1191 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-03 14:29:29 +00:00
Timothy Wall ddc2688af8 update release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1190 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-03 14:26:47 +00:00
Timothy Wall baa60b6198 fix invalid PPC relocation types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1189 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-03 12:15:51 +00:00
Timothy Wall 8abdddf11a avoid ant warning
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1188 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-03 12:13:02 +00:00
Timothy Wall 9141018b27 partial repair of osx build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1187 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-28 23:04:20 +00:00
Timothy Wall 3370fecdf2 make Memory easier to extend, use synchronized map to track buffers
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1186 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-28 22:19:33 +00:00
Anthony Green 30ff28e1d8 Fix permissions 2011-02-28 15:36:23 -05:00
Anthony Green 09f8f310f4 More AIX fixes. rc9. 2011-02-28 15:36:07 -05:00
Anthony Green 53d7b16564 Merge branch 'master' of https://github.com/landonf/libffi-ios 2011-02-28 15:23:31 -05:00
Daniel Doubrovkine 5e91f76f0f Added Kernel32.GetFileAttributes and Kernel32Util.getFileAttributes.
Patch by cdanninger.
http://java.net/jira/browse/JNA-175


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1185 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-28 01:33:47 +00:00
Timothy Wall 557b3e1c93 allow multiple fields of same type in union
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1184 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-26 02:51:01 +00:00
Anthony Green 18dd85d6cb rc8. fix last patch. 2011-02-25 16:23:04 -05:00
Anthony Green 74ee6ea8b4 rc7. More AIX fixes. 2011-02-25 15:52:14 -05:00
Anthony Green 2541679dbd Fix ppc32 bug 2011-02-25 15:09:13 -05:00
Anthony Green cbb062cc35 Another non-GCC configury fix 2011-02-17 20:39:21 -05:00
Anthony Green 8cf8878425 Fix ax_cc_maxopt.m4 2011-02-15 15:19:49 -05:00
Daniel Doubrovkine 3f65e56ccd Moved release notes to www. Modified HTML to fit Kenai website.
To upload to Kenai use Webdav to jna.java.net (w/SSL), the path is /website/jna/. 
Results at http://jna.java.net/. 

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1183 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-15 18:09:05 +00:00
Anthony Green 24b72070c0 Fix warning and msvcc patches 2011-02-14 15:30:57 -05:00
Anthony Green d72c49e556 Add missing msvcc.sh 2011-02-13 11:41:05 -05:00
Landon Fuller 3000dc237f Merge remote branch 'upstream/master' 2011-02-13 08:55:53 -05:00
Anthony Green 1fbf9dc44f Fix bad_abi test. rc5. 2011-02-13 08:06:39 -05:00
Anthony Green 90af15ef5c iOS fixes 2011-02-12 12:29:36 -05:00
Landon Fuller 55e4a5aa15 Add support for building a full armv6/armv7/i386 universal iOS library 2011-02-12 12:13:46 -05:00
Landon Fuller a0c80f279b Update my e-mail address. 2011-02-12 11:43:49 -05:00
Landon Fuller 8195e0e11d Fix symbol prefixes on Darwin. 2011-02-12 11:27:00 -05:00
Landon Fuller 56b3f8cef0 Modify the ffi_closure structures to hold table/table entry pointers instead of a code buffer.
This re-integrates commit da2773e02a.
2011-02-12 11:14:54 -05:00
Landon Fuller 28a00f61ff Apple assembler support; fixed most gas/ELF-isms. 2011-02-12 11:01:48 -05:00
Landon Fuller 7f2ea33a80 Replace RETLDM macro.
The macro is incompatible with Apple's assembler; switch to
a simple inline version.
2011-02-12 10:39:18 -05:00
Landon Fuller 92ff23e77f Switch to the current iOS 4.2 SDK. 2011-02-12 10:24:49 -05:00
Landon Fuller 58fb8ca2df Merge remote branch 'upstream/master' 2011-02-12 10:23:19 -05:00
Landon Fuller cc3fbd975c Merge branch 'master' of github.com:landonf/libffi-ios 2011-02-12 10:21:02 -05:00
Landon Fuller e449a43bbe Allow specification of the minimum supported iOS version. 2011-02-12 10:20:42 -05:00
Anthony Green 71c792f51b rc4 2011-02-12 09:33:11 -05:00
Anthony Green 7c7c9f3272 ungccify parts of the build 2011-02-12 09:29:29 -05:00
Anthony Green ed62e48b95 Fix permissions 2011-02-11 12:23:58 -05:00
Anthony Green 17d9e9e68d Use newer autotools. Only build debug.c when --enable-debug. 2011-02-11 12:23:20 -05:00
Anthony Green 6972a4ffda Fix xlc build on AIX 2011-02-11 07:32:51 -05:00
Anthony Green 1833aa0fb9 sparc ABI test fix. 2011-02-11 07:11:04 -05:00
Anthony Green f1fb139b4e Fix tests 2011-02-09 18:30:02 -05:00
Anthony Green 5cb470331d Fix permissions 2011-02-09 15:23:06 -05:00
Anthony Green 269deef6db rc3 2011-02-09 15:22:23 -05:00
Anthony Green 42695e7250 Fix IRIX support 2011-02-09 15:12:35 -05:00
Anthony Green a6e56b97f6 Add powerpc64-*-darwin* support 2011-02-09 15:00:42 -05:00
Anthony Green 747d6c32d4 Add Interix support 2011-02-09 14:56:23 -05:00
Anthony Green eab6e41cde Remove README.markdown form libffi-ios 2011-02-09 10:15:02 -05:00
Anthony Green 69dbe845f4 Fix xfails 2011-02-09 07:38:43 -05:00
Anthony Green f498318c07 Update README for iOS again 2011-02-09 06:26:46 -05:00
Anthony Green 630b9c0ac4 Update to rc2 2011-02-09 06:24:23 -05:00
Anthony Green 0cad4386fa Add ChangeLog entry. Fix copyright headers. 2011-02-09 06:11:46 -05:00
Anthony Green 09cb76f264 Add missing change 2011-02-08 20:39:51 -05:00
Anthony Green 2e3a48ccdd Fix make dist 2011-02-08 20:37:26 -05:00
Anthony Green 5e4814d992 fix permissions 2011-02-08 19:46:28 -05:00
Anthony Green 5c0cc6f153 3.0.10rc1 2011-02-08 19:45:59 -05:00
Anthony Green 857fe3de46 Clean ups 2011-02-08 19:39:20 -05:00
Anthony Green e2214f8adb Update README 2011-02-08 19:22:56 -05:00
Anthony Green 1106229a57 Add iOS support 2011-02-08 19:20:09 -05:00
Anthony Green bc9d0be295 3.0.10rc0 changes 2011-02-08 17:04:26 -05:00
Anthony Green 3b836249fe Rebase from GCC 2011-02-08 14:28:59 -05:00
Anthony Green a26e394061 copyright updates patch 2011-02-08 13:56:12 -05:00
Anthony Green b8099539f0 Fix msvcc.sh botch 2011-02-08 13:50:43 -05:00
Anthony Green dc411e8f99 Fix HP-UX build 2011-02-08 10:49:29 -05:00
Anthony Green 404585d134 Fix sparc v8 aggregate type returns for sun's compiler 2011-02-08 10:44:36 -05:00
Anthony Green 19ce713188 grammar fix 2011-02-08 10:34:23 -05:00
Anthony Green 89284fe55f Fix AIX build with IBM XLC 2011-02-08 10:19:19 -05:00
Anthony Green ba022c338a fix win64-underscore patch 2011-02-08 10:12:48 -05:00
Anthony Green 097e5f3924 x86 pcrel test part 2 2011-02-08 10:11:00 -05:00
Anthony Green ed2c518d96 x86 pcrel test 2011-02-08 10:10:07 -05:00
Anthony Green 0e5843995f Refresh from GCC 2011-02-08 07:52:40 -05:00
nguillaumin 5bd2cba2c2 Added platform.win32.Advapi32.ImpersonateSelf
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1182 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-03 04:04:12 +00:00
nguillaumin 3de7eb58a7 Added platform.win32.Advapi32.AdjustTokenPrivileges, platform.win32.Advapi32.LookupPrivilegeName, platform.win32.Advapi32.LookupPrivilegeValue + tests.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1181 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-01-30 22:31:15 +00:00
nguillaumin 41eb294ce6 [issue #169] Added new Win32 platform function mappings related to process creation. SECURITY_ATTRIBUTES structure has been moved to WinBase to reflect latest MSDN doco.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1180 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-01-16 22:17:34 +00:00
Timothy Wall ba94f2ebe0 add platform.jar to maven package
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1179 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-01-12 14:34:21 +00:00
Timothy Wall 7912248950 add platform.jar to maven package
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1178 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-01-12 14:24:50 +00:00
Daniel Doubrovkine 5d27c255b3 Killed link to forum. Forum RIP.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1177 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-12-22 04:56:38 +00:00
Eugine Lev 80e86e3b83 Bug: fix issues with starting/stopping services, caused by the service resetting progress checkpoint to 0.
Add getters for service handle and service manager handle in W32Service and W32ServiceManager respectively.

CR: dBlock

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1176 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-12-14 19:28:19 +00:00
Daniel Doubrovkine 3a759f1eea Fix platform.win32.Netapi32Util.getDC AV on Win64
https://jna.dev.java.net/issues/show_bug.cgi?id=167
Fix Advapi32Test.testGetTokenOwnerInformation AV.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1175 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-12-13 18:35:21 +00:00
Timothy Wall a09e503f19 fix Structure(Pointer) array field init bugs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1174 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-11-24 22:59:12 +00:00
Timothy Wall da4524b05c partially fix build on OSX 10.6 (omits ppc build)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1173 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-11-24 21:59:42 +00:00
Timothy Wall 1a98283709 Fix NPE in array element initialization
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1172 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-11-24 21:50:09 +00:00
Timothy Wall acca8c5ac9 add two (failing) tests based on Samuel Audet's reports on lack of field initialization in Structure with Pointer ctors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1171 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-11-24 20:25:03 +00:00
Timothy Wall 55eabb84e4 fix Structure.StructureSet.Iterator bug
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1170 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-11-24 20:15:45 +00:00
Anthony Green 5b9cd52784 win64-underscore patch 2010-11-22 15:19:57 -05:00
Anthony Green 2db72615b5 Rebase 2010-11-21 10:50:56 -05:00
Landon Fuller f6ab3edc23 Include the license header in the generated output. 2010-10-27 19:34:51 -04:00
Landon Fuller cef6194628 Add missing copyright/license header. 2010-10-27 14:01:01 -04:00
Daniel Doubrovkine 90ba9fce2a Added EventLogRecord.getData() and getStrings().
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1169 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-13 23:57:22 +00:00
Daniel Doubrovkine 76b3982ddd Fixed Javadoc warnings.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1168 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 21:35:28 +00:00
Daniel Doubrovkine c946f80d5b Fixed Javadoc warnings.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1167 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 21:34:20 +00:00
Eugine Lev 8d350c7d99 Add platform.win32.W32ServiceManager and W32Service.
Add platform.win32.Kernel32.GetTickCount.
CR: dBlock

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1166 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 21:18:43 +00:00
Daniel Doubrovkine 7cd7fb8d6c Add REG_BINARY, REG_EXPAND_SZ and REG_MULTI_SZ support to Advapi32Util.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1165 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 14:26:31 +00:00
Daniel Doubrovkine b12e563340 Build break: fixed service name in Advapi32Test.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1164 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 03:39:51 +00:00
Daniel Doubrovkine 9c0aadce1e Added REG_BINARY support to Advapi32Util registry functions.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1163 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 01:03:30 +00:00
Daniel Doubrovkine b8d538b1b4 Removed unused functions in NTService demo, equivalents have long been ported to platform.win32.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1162 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 01:02:18 +00:00
Daniel Doubrovkine 0219cd71b9 Fix platform.win32.Kernel32.GetNativeSystemInfo and GetSystemInfo AV on Win64.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1161 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 00:03:25 +00:00
Eugine Lev 899fcbdfcc Add Win32 Service functions to platform.win32.Advapi32
CR: dBlock

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1160 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-05 23:51:34 +00:00
Daniel Doubrovkine 79fed6e32f Updated projects using JNA to be a link to a forum where people can post themselves.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1159 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-03 20:42:48 +00:00
Daniel Doubrovkine 55263ca11d Documented EVENTLOGRECORD.
Added flags to iterate forwards and backwards.
Collapsed record ID using the value in the structure.
Shortened tests.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1158 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-30 20:04:58 +00:00
Daniel Doubrovkine fe1f4a3bac Add EventLogIterator to Advapi32Util.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1157 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-30 15:08:26 +00:00
Daniel Doubrovkine dd4fda55b5 Re-oredered test report for JNA to run after tests to avoid merging wrong results.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1156 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 14:03:56 +00:00
Daniel Doubrovkine 2aae506110 Added xml test report, generating in jnalib\contrib\platform\build\test\results\TESTS-TestSuites.xml.
Shortened runtime of testReadEventLogEntries.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1155 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 14:01:56 +00:00
Daniel Doubrovkine aae54a6f41 Added WinspoolUtil.getPrinterInfo4.
Not expecting failure in spool tests on the first call: when no printers are installed the function succeeds and returns 0 bytes required and 0 printers returned.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1154 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 12:18:31 +00:00
Daniel Doubrovkine 89da58adec Added PRINTER_INFO_4.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1153 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 02:41:40 +00:00
Daniel Doubrovkine 57ef003eb9 Added Advapi32.GetOldestEventLogRecord.
Added WinNT.EVENTLOGRECORD.
Bug: ReadEventLog broken, added full test.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1152 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 01:24:56 +00:00
Daniel Doubrovkine d378a64096 Hopefully fixed the WinspoolTest for when there're no printers installed.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1151 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 00:17:01 +00:00
Daniel Doubrovkine 58ac91bc10 Fixed spool tests for cases where no printers are available.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1150 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-28 23:43:19 +00:00
Daniel Doubrovkine 97602c0bf8 Fixed a number if UNUSED warnings.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1149 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-28 19:42:46 +00:00
Daniel Doubrovkine 8523c487c1 platform.win32.Advapi32Util.registryCreateKey returns true if key was created, false if it already exists.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1148 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-28 15:47:03 +00:00
Daniel Doubrovkine 3580b58bf6 Add platform.win32.Kernel32.DeleteFile and com.sun.jna.platform.win32.deleteFile.
Add Event Logging functions to platform.win32.Advapi32.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1147 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-27 23:51:27 +00:00
Landon Fuller 53f387b203 Minor README fix. 2010-09-19 19:57:17 -07:00
Landon Fuller 4fbcb5b5fb Minor README fix. 2010-09-19 19:50:37 -07:00
Landon Fuller 8e7652ef6a Add a libffi-ios-specific github README. 2010-09-19 19:49:39 -07:00
Landon Fuller 83038cf24a Implement FFI_EXEC_TRAMPOLINE_TABLE allocator for iOS/ARM.
This provides working closure support on iOS/ARM devices where
PROT_WRITE|PROT_EXEC is not permitted. The code passes basic
smoke tests, but requires further review.
2010-09-19 14:36:45 -07:00
Landon Fuller b00ff3e98f Rename the generated symbol 2010-09-19 14:22:26 -07:00
Landon Fuller da2773e02a Modify the ffi_closure structures to hold table/table entry pointers instead of a code buffer. 2010-09-19 14:21:37 -07:00
Landon Fuller 01d71b7bed Regenerated the autoconf script 2010-09-19 14:21:14 -07:00
Landon Fuller 19afda0069 Enable AC_SUBST for FFI_EXEC_TRAMPOLINE_TABLE 2010-09-19 14:20:52 -07:00
Landon Fuller 9e1196444e Add a hard-coded FFI_EXEC_TRAMPOLINE_TABLE arm implementation.
This implements support for re-mapping a shared table of executable
trampolines directly in front of a writable configuration page, working
around PROT_WRITE restrictions for sandboxed applications on Apple's
iOS.

This implementation is for testing purposes; a proper allocator is still
necessary, and ARM-specific code needs to be moved out of
src/closures.c.
2010-09-19 10:43:06 -07:00
Landon Fuller f38364b399 Fix symbol prefix for ffi_closure_SYSV_inner on Darwin. 2010-09-19 10:42:36 -07:00
Landon Fuller 36849e7716 Whitespace/comment fixes. 2010-09-19 09:35:04 -07:00
Landon Fuller b764162526 Fix the script name (build-iphone.sh -> build-ios.sh) 2010-09-19 09:04:34 -07:00
Landon Fuller a3d9aa8501 Update the autogenerated autoconf/automake files. 2010-09-19 09:03:52 -07:00
Landon Fuller c71480eaf8 Update automake/autoconf to conditionally build src/arm/trampoline.S if FFI_EXEC_TRAMPOLINE_TABLE is enabled. 2010-09-19 09:02:05 -07:00
Landon Fuller 9af9291b73 Add the trampoline table generated by gentramp.sh 2010-09-19 08:52:33 -07:00
Landon Fuller 68ce0c383e Add a shell script that generates the ARM trampoline page.
This generates a page of 340 trampolines, aligned within one page. The
trampolines use pc-relative addressing to reference config data
(context, jump address) from a page placed directly prior to the
trampoline page. This can be used on systems -- such as iOS -- that do not
support writable, executable memory by remapping the executable page
containing the trampolines directly above a newly allocated writable
config page.
2010-09-19 08:38:19 -07:00
Landon Fuller 75af086be8 Update autoconf files 2010-09-18 18:12:19 -07:00
Landon Fuller 1ac92cca9b Add autoconf check for W^X platforms that require a trampoline table.
This adds the FFI_EXEC_TRAMPOLINE_TABLE. The flag is enabled for
arm-apple-darwin, where PROT_EXEC on writable (or formerly writable) pages is
not permitted for sandboxed binaries.
2010-09-18 18:08:14 -07:00
Landon Fuller be72fbab29 Use the correct host triple for arm/darwin 2010-09-18 18:02:25 -07:00
Landon Fuller 70150bdf45 Add missing UNWIND entry; disables .pad on non-EABI targets. 2010-09-18 16:38:03 -07:00
Landon Fuller 6b452bafae Apple assembler support; fixed most gas/ELF-isms. 2010-09-18 16:21:32 -07:00
Landon Fuller 8ddac835b6 Fix placement of the __APPLE__ macro. 2010-09-18 15:38:06 -07:00
Landon Fuller 69043d0293 Work-around libffi's FP ABI detection.
On iOS, we must use the AAPCS floating point return value calling
conventions. libffi's ARM implementation will only use these conventions
if __SOFTFP__ is defined, which is not the case when GCC's
-mfloat-abi defaults to 'softfp' instead of 'soft'. To work around this
we manually define __SOFTFP__ for Apple platforms in the ARM-specific
sysv.S.

See also:
  http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/iPhoneOSABIReference/Introduction/Introduction.html
  http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf
2010-09-18 15:32:08 -07:00
Landon Fuller a82e6c354e Add a stub iOS build script to drive autoconf 2010-09-18 14:44:24 -07:00
Anthony Green 84e8de6e9f Restore execute permissions 2010-08-06 01:35:12 -04:00
Anthony Green 3aeecc9eb1 Fix win64-struct-args patch 2010-08-05 15:19:00 -04:00
Anthony Green 00d0b59cd1 Fix debug build for windows 2010-08-05 14:56:53 -04:00
Anthony Green bda487e870 Don't use -safeseh with ml64 2010-08-05 09:02:41 -04:00
Anthony Green c1d28ba8d5 stdcall-x86-closure-fix 2010-08-05 08:48:16 -04:00
Anthony Green 5feacad4a5 define generic symbols carefully 2010-08-05 08:30:04 -04:00
Anthony Green 10ea848900 don't copy win64 struct args 2010-08-05 08:24:27 -04:00
Timothy Wall 9b26a4d5ce add omitted field type which might use current value if available
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1146 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 15:46:00 +00:00
Timothy Wall c43fc68bc8 fix potential NPE
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1145 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 15:43:44 +00:00
Timothy Wall df07539331 fix unused parameter warnings under gcc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1144 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 15:22:22 +00:00
Timothy Wall 563931750b fix compiler error
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1143 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 15:22:02 +00:00
Timothy Wall 6b090de7b1 avoid potential overflow
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1142 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 14:28:54 +00:00
Timothy Wall d8863ef95f fulfill hashCode contract for Function
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1141 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 14:28:21 +00:00
Timothy Wall 36f9595ce7 make memory clear intent obvious
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1140 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 14:26:53 +00:00
Anthony Green d14178be4c FFI_LAST_ABI fix 2010-07-23 09:14:00 -04:00
Timothy Wall 48565e6305 integrate platform javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1139 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-22 15:08:26 +00:00
Timothy Wall 3727f9583b remove extraneous stuff from source archives
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1137 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 14:48:27 +00:00
Timothy Wall 4a6bbf0b3c update javadoc (version change)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1136 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 03:17:25 +00:00
Timothy Wall 7513a7157f ensure source properly synched with binaries
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1135 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 03:11:04 +00:00
Timothy Wall e7dbdb6ead tweak BITMAPINFO structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1134 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 01:39:21 +00:00
Timothy Wall db5f101bfc tweak BITMAPINFO structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1133 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 01:39:00 +00:00
Timothy Wall 3c06e8b6fd add GDI test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1132 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 01:33:44 +00:00
Timothy Wall 28f94cbd0b simplify and clean up contrib hierarchy, fix contrib builds on 64-bit platforms
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1131 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-20 02:30:38 +00:00
Timothy Wall 6f37cbd946 update platform.jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1128 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-20 01:39:22 +00:00
Timothy Wall 396281263b update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1126 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 20:44:33 +00:00
Timothy Wall a00e8ac201 tweak version on main jar file
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1125 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 20:31:04 +00:00
Timothy Wall b1772a89c1 bump version in release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1124 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 20:15:58 +00:00
Timothy Wall 58f07ff045 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1123 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:56:16 +00:00
Timothy Wall 12f99d4fc7 update native lib to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1122 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:40:26 +00:00
Timothy Wall 05da0a6877 update native jar to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1121 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:21:05 +00:00
Timothy Wall 46ce871f34 update copyright notices
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1120 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:20:51 +00:00
Timothy Wall 4b22c2f044 update release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1119 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:10:54 +00:00
Timothy Wall 4014828eff add some GDI32 functions
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1118 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:09:53 +00:00
Timothy Wall bc87a62d59 update native lib to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1117 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 15:40:33 +00:00
Timothy Wall f6862442d3 update native lib to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1116 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 15:22:42 +00:00
Timothy Wall bff7f57eb8 update native lib to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1115 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 15:17:21 +00:00
Timothy Wall e19024ca0d update native to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1114 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 15:07:25 +00:00
Timothy Wall 73997e4799 update native libs to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1113 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:28:35 +00:00
Timothy Wall ffa97aa438 update native lib (w/ correct version)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1112 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:22:00 +00:00
Timothy Wall d08244dfd8 properly patch Makefile with native version
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1111 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:15:14 +00:00
Timothy Wall 2e0d367045 update native code
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1110 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:09:12 +00:00
Timothy Wall 0f1fb2e6a1 Bump native code bug revision
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1109 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:05:17 +00:00
Timothy Wall 672e362ed8 add pointer peer accessor
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1108 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:04:05 +00:00
Daniel Doubrovkine bcae16c441 Native.loadLibrary can now load .drv files.
Add platform.win32.Winspool.GetPrinterInfo.
Add platform.win32.WinspoolUtil.getPrinterInfo1.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1107 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-18 16:51:39 +00:00
Timothy Wall 19b8f5cb59 clarify FAQ entry
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1106 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-16 14:41:05 +00:00
Timothy Wall 68b37156d8 update FAQ
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1105 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-16 14:13:28 +00:00
Timothy Wall d9237b64c0 update FAQ
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1104 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-16 14:05:56 +00:00
Anthony Green 3f5b1375ab rebase 2010-07-12 14:39:18 -04:00
Anthony Green eaf444eabc Fix selinux test 2010-07-10 08:59:09 -04:00
Scott Palmer da037b38e3 Updated release notes.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1103 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-28 13:20:15 +00:00
Scott Palmer 62f864f4ab Added SHGetDesktopFolder.
It obtains a COM interface, so this is just to prepare
for Com4JNA support (will need to get a COM interface
to test Com4JNA).



git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1102 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-25 19:13:56 +00:00
Daniel Doubrovkine bf89f1d37d Add Kernel32.GetDiskFreeSpaceEx, GetLogicalDriveStrings, GlobalMemoryStatusEx.
Add Kernel32Util.getLogicalDriveStrings.
Add WinDef ULONGLONG and DWORDLONG.
Refactor WinNT.LARGE_INTEGER into a union.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1101 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-23 00:55:05 +00:00
Daniel Doubrovkine 3dc986e609 Added VER* constants.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1100 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-22 17:05:38 +00:00
Daniel Doubrovkine 2f5e874201 Add com.sun.jna.platform.win32.BaseTSD.DWORD_PTR.
Add com.sun.jna.platform.win32.WinBase.SYSTEM_INFO.
Add com.sun.jna.platform.win32.WinNT.OSVERSIONINFOEX.
Add Kernel32 GetVersionEx, GetSystemInfo, GetNativeSystemInfo and IsWow64Process.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1099 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-22 14:46:07 +00:00
Daniel Doubrovkine 05291932f8 Add com.sun.jna.platform.win32.Kernel32.GetVersion and GetVersionEx.
Add com.sun.jna.platform.win32.User32.GetSystemMetrics.
Refactor constants from com.sun.jna.platform.win32.GDI32 into WinGDI, matching Windows SDK headers.
Refactor constants from com.sun.jna.platform.win32.User32 into WinUser, matching Windows SDK headers.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1098 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-22 02:39:37 +00:00
Timothy Wall 72aa450ecb Provide String.replace for 1.4 compatibility
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1097 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-18 11:07:10 +00:00
Daniel Doubrovkine 926ea21fe0 Added Advapi32Util.isWellKnownSid.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1096 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-16 12:10:45 +00:00
Daniel Doubrovkine 657a077cdb Add com.sun.jna.platform.win32.WinNT.WELL_KNOWN_SID_TYPE, SECURITY_MAX_SID_SIZE and other related SID-related constants.
Add com.sun.jna.platform.win32.Advapi32.CreateWellKnownSid and IsWellKnownSid. 

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1095 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-15 14:41:44 +00:00
Daniel Doubrovkine 9a90f56845 Fixed incorrect comments on autoread/write.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1094 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-02 17:24:45 +00:00
Daniel Doubrovkine 7d36e0d63b Fix error not reported properly in getTokenGroups/getTokenAccount.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1093 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-28 23:29:55 +00:00
Daniel Doubrovkine 865d5ed7a1 Updated copyright notices so that Tim doesn't go to jail for my bugs (also makes my company legal happy).
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1092 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-28 21:27:01 +00:00
Daniel Doubrovkine 9dd91ee17e Deleting the wrong pointer.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1091 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-28 21:08:34 +00:00
Daniel Doubrovkine 425ea821d7 Add platform.win32.Secur32.ImpersonateSecurityContext and RevertSecurityContext.
Fix platform.win32.Secur32.QuerySecurityContextToken take a CtxtHandle, avoid indirection.
Updated release notes with win32 changes so far.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1090 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-28 14:58:27 +00:00
Scott Palmer bea5049a2f Updated release notes to reflect new behavior of jna.library.path.
Fixed invalid HTML in the Release 3.0 notes.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1089 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-20 18:54:54 +00:00
Scott Palmer eae1e34696 Re-evaluate jna.library.path on each library load instead of caching the value.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1088 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-20 14:21:59 +00:00
Scott Palmer e63b6b00bc Added ObjBase.java for constant definitions. Modified unit test to use constants from ObjBase.java
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1087 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-19 13:26:45 +00:00
Daniel Doubrovkine e5b3ed226b Bug: read() of uninitialized memory in getTokenGroups/getTokenAccount.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1086 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-16 22:33:28 +00:00
Daniel Doubrovkine d5ce354c87 Added missing docs.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1085 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-14 16:50:11 +00:00
Timothy Wall e280838989 fix typo in comment
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1084 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-14 13:38:15 +00:00
Timothy Wall 2309054b1f address issue 156
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1083 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-14 13:10:56 +00:00
Timothy Wall 9dcc44a76b addrss issue 154
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1082 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-14 13:08:13 +00:00
Scott Palmer 7a417c6d3b Moved CLSCTX_* definitions to WTypes.java
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1081 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-13 20:51:44 +00:00
Scott Palmer 425ab15ae1 Added CoInitializeEx, CoUninitialize, and CoCreateInstance, with unit tests.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1080 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-13 18:47:54 +00:00
Daniel Doubrovkine c75ff4f118 Minor doc/comment changes.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1079 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-12 20:14:26 +00:00
Daniel Doubrovkine 75d3dd19ec Added Scott Palmer's oleaut32.dll interface + tests.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1078 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-12 20:11:41 +00:00
Timothy Wall 4cd556555e add note on win32 gcc version
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1077 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-12 13:30:03 +00:00
Anthony Green 6309741522 Micharl Kohler's spelling fixes 2010-05-05 20:14:56 -04:00
Daniel Doubrovkine feebe921af Fixed all the trivial warnings. Down to about 30 or so.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1076 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-28 00:38:42 +00:00
Daniel Doubrovkine 92929308bd Refactor com.sun.jna.platform.win32.WINBASE into WinDef, WinNT and BaseTSD, matching Windows SDK headers.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1075 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-27 02:10:00 +00:00
Timothy Wall ca4f14b555 fix issue 152
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1074 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-25 20:05:14 +00:00
Timothy Wall a7bcfacbd9 fix issue 151
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1073 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-15 13:22:45 +00:00
Timothy Wall e097b4820d fix deprecation warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1072 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-13 21:22:45 +00:00
Timothy Wall 566ec7974c split contrib jars into its own target
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1071 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-13 17:37:45 +00:00
Timothy Wall c735d6c420 avoid deprecated function
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1070 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-13 17:31:21 +00:00
Timothy Wall cf54ca9551 fix issue 133
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1069 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-13 17:04:04 +00:00
Anthony Green 9dc9a293f3 Rebase to latest GCC sources 2010-04-13 10:33:52 -04:00
Anthony Green f2c2a4fce9 Remove warnings and add OS/2 support 2010-04-13 10:19:28 -04:00
Timothy Wall 9f1da1b562 sync libffi
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1068 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-10 16:36:02 +00:00
Timothy Wall f5a3dbf82b add OSX 10.6 SDK
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1067 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-10 16:34:00 +00:00
Daniel Doubrovkine 89f83e796a Collapsing accounts and groups, all of those are just windows accounts.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1066 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-07 19:27:20 +00:00
Daniel Doubrovkine 977a9e49c5 Extended Group to include FQN and domain.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1065 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-07 16:33:19 +00:00
Daniel Doubrovkine 7ee0a4b39f Added 3.2.5 javadoc, fixed links in index.html.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1064 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-06 16:27:46 +00:00
Daniel Doubrovkine 4268e3a1d2 Release 3.2.5.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1062 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-06 15:32:21 +00:00
Daniel Doubrovkine 860b9a266a Fixed demo builds to make .jar files double-clickable.
Added eclipse project to www.
Documented platform.jar in site.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1061 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-06 15:14:53 +00:00
Daniel Doubrovkine c39d752ccb Added Netapi32.DsGetDcName, DsGetForestTrustInformation and DsEnumerateDomainTrusts.
Ported some of DsGetDC.h and NTSecApi.h.
Bug: Netapi32Util.getDCName returns wrong value.
Bug: Netapi32Util.getCurrentUserLocalGroups doesn't work for a user logged onto a domain.
Added WinNT.LARGE_INTEGER.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1060 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-02 17:05:27 +00:00
Daniel Doubrovkine 15db1cf385 Updated release notes with all the win32/platform changes.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1059 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-01 15:47:49 +00:00
Daniel Doubrovkine 38d684d1e6 Used generics for several existing utility classes, fixing warnings (platform is built with Java 1.5+). Split FileUtils into win32, mac specifics so we can write os-based unit tests just like W32FileMinotorTest.
Fixed exception in W32FileMonitor which throws an unhandled exception when disposing because the watched handle is closed.
Modified W32FileUtils and ShellAPI's SHFILEOPSTRUCT to support unicode paths.
Fixed ShellApi structure alignment introduced in a previous check-in.
Readded LastErrorException string constructor.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1058 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-01 12:59:08 +00:00
Daniel Doubrovkine ccb1bc514b Split FileMonitor and W32FileMinitor into different namespaces, removed isWindows hack in the tests.
Added Kernel32.GetTempPath and Kernel32Util.getTempPath.
Added missing copyright notices.
Divided Shell32 into ShellApi (ported from ShellApi.h), ShlObj (ported from ShlObj.h).
Added Shell32Util.getFolderPath.
Added WinDef (ported from Windef.h) with MAX_PATH.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1057 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-31 15:47:04 +00:00
Daniel Doubrovkine 27c46a2c8e Added Kernel32Util.FormatMessageFromLastError and FormatMessageFromHR.
Added Win32Exception that properly maps system error messages, to be used in Win32 util classes instead of LastErrorException that's a cross-platform version that doesn't try to format the string error.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1056 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-31 14:08:25 +00:00
Daniel Doubrovkine ff2f1d237a Added Ole32.CoCreateGuid, StringFromGUID2 and IIDFromString.
Added Ole32Util.getGUIDFromString, getStringFromGUID and generateGUID.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1055 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-30 23:09:26 +00:00
Daniel Doubrovkine 402f4c162c Added Secur32.QuerySecurityContextToken.
Added Sspi.PSecHandle.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1054 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-30 21:45:14 +00:00
Anthony Green c0b69e57d5 Dan Witte's windows build fixes. 2010-03-30 08:30:22 -04:00
Daniel Doubrovkine 81013a98b4 Added Secur32.EnumerateSecurityPackages and FreeContextBuffer.
Added Secur32Util.getSecurityPackages.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1053 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-29 17:51:58 +00:00
Daniel Doubrovkine 971dd622c7 Added Sspi.java, ported from sspi.h.
Added Secur32.AcquireCredentialsHandle, InitializeSecurityContext, DeleteSecurityContext, AcceptSecurityContext.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1052 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-26 13:11:30 +00:00
Daniel Doubrovkine 0045d31e2d Added Crypt32.CryptProtectData and CryptUnprotectData.
Added WinCrypt, ported from WinCrypt.h.
Added Crypt32Util.cryptProtectData and cryptUnprotectData.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1051 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-24 14:44:30 +00:00
Daniel Doubrovkine caef8f4ebc Added Advapi32Util.registryGetKeys and registryGetValues.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1050 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-24 11:51:53 +00:00
Daniel Doubrovkine 6116c1ae71 Moved definitions from Kernel32 into WinNT where they belong.
Added Advapi32.RegOpenKeyEx, RegQueryValueEx, RegCloseKey, RegDeleteValue, RegSetValueEx, RegCreateKeyEx, RegDeleteKey, RegEnumKeyEx, RegEnumValue, RegQueryInfoKey.
Added Advapi32Util.registryKeyExists, registryValueExists, registryGetStringValue, registryGetIntValue, registryCreateKey, registrySetIntValue, registrySetStringValue, registryDeleteKey, registryDeleteValue.
Added missing documentation in Kernel32.
Added Wdm, NtDll.ZwQueryKey and NtDllUtil.getKeyName.
Added WinReg and REG* definitions from WinNT.h.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1049 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-23 18:05:45 +00:00
Timothy Wall 03ecf2b0bb use 1.4-compatible URI generation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1048 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-23 02:43:55 +00:00
Daniel Doubrovkine d4a5005273 Wrong comment.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1047 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-21 15:17:32 +00:00
Daniel Doubrovkine 7522f29f0a Commented out impersonation test. Wild guess on which one's failing.
Fixed warnings with function parameter names.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1046 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-21 14:59:18 +00:00
Daniel Doubrovkine 09f0a2e4a6 Added Advapi32.ImpersonateLoggedOnUser and RevertToSelf.
Added Advapi32Util.GetTokenGroups, GetTokenAccount.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1045 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-18 03:52:45 +00:00
Daniel Doubrovkine aa846929f3 Added LMAccess GROUP_USERS_INFO_*, LOCALGROUP_USERS_INFO_*, GROUP_INFO_* and USE_PRIV* masks.
Added Netapi32.NetGroupEnum, NetUserEnum, NetUserGetGroups, NetUserGetLocalGroups, NetUserAdd, NetUserDel and NetUserChangePassword.
Added Netapi32Util.getGlobalGroups, getUsers, getUserLocalGroups, getCurrentUserGroups, getUserGroups.
Fixed tmp location to try to get windows tmp for File monitor test.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1044 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-16 21:59:16 +00:00
Daniel Doubrovkine b378af7cb1 Refactored Advapi32Util getAccount* functions to getAccountByName and getAccountBySid returning an Account structure.
Added Advapi32Util.getCurrentUserGroups.
Added LMAccess LOCALGROUP_INFO_1, USER_INFO_0 and USER_INFO_1.
Refactored Netapi32Util.getLocalGroups to return a Group structure.
Added WinNT TOKEN_GROUPS, SID_NAME_USE and SID_AND_ATTRIBUTES.
 

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1043 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-16 12:19:14 +00:00
Anthony Green 59a259f4d3 Remove junk file 2010-03-15 05:57:51 -04:00
Anthony Green 3de1eb36d3 fix-comments patch 2010-03-15 05:57:24 -04:00
Daniel Doubrovkine 8b549a487f Replaced SID references by PSID, PSIDByReference and PSID.ByReference.
Added Advapi32.IsValidSid, OpenProcessToken, DuplicateToken and GetTokenInformation.
Added WinNT.SECURITY_IMPERSONATION_LEVEL, TOKEN_INFORMATION_CLASS, SID_AND_ATTRIBUTES, TOKEN_OWNER, PSID, PSID_BY_REFERENCE, TOKEN_USER.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1042 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-12 23:11:17 +00:00
Daniel Doubrovkine 005f659eaa Renamed jnacontrib-*.jars to demo-*.jar for demos.
Added Advapi32.OpenThreadToken.
Added Kernel32.OpenThread, OpenProcess and some documentation for tested functions.
Added WinNT.java, ported from winnt.h for thread and token access defitions.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1041 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-10 17:09:03 +00:00
Daniel Doubrovkine a5aad94f24 Build break: chicken-and-egg problem of depending on dist/jna.jar.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1040 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-10 14:41:48 +00:00
Daniel Doubrovkine 52a6926da3 Added eclipse and ANT projects for all contrib folders. All build and run.
JnaContrib projects drop a jnacontrib-*.jar into dist.
Deleted leftover private settings in ntservice.
Added Advapi32.LogonUser.
Removed throws Exception in Advapi32Util.
Got rid of obsolete w32util.jar.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1039 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-10 14:12:28 +00:00
Daniel Doubrovkine b3c0f003bb Don't run win32 tests on unix.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1038 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 23:48:54 +00:00
Daniel Doubrovkine 3d2360bc56 Merged platformutil and jna.platform into a contrib/platform package.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1037 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 23:17:55 +00:00
Daniel Doubrovkine 1267f51d8c Fixed typo in build.xml.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1036 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 18:15:34 +00:00
Daniel Doubrovkine e7328001a4 Got rid of w32util and moved its code to platformutil...win32.
Now platformutil is all of specific and cross-platform APIs.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1035 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 18:12:14 +00:00
Daniel Doubrovkine fc7b53e809 Got rid of examples.jar, split into several packages.
# platform apis - com.sun.jna.platform.*, part of jna.jar.
# platform wrappers and utilities (FileMonitor, KeyboardUtils, etc.) - contrib/com.sun.jna.platformutil, new platformutil.jar.
# demo and sample code - contrib/<new project for each demo>


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1034 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 17:56:58 +00:00
Daniel Doubrovkine 50637cb3c2 - Advapi32Util.getAccountName now always returns a fully qualified name.
- Added Kernel32Util with getComputerName.
- Added Netapi32Util.getDCName and getJoinStatus.
- Added Kernel32.GetComputerName
- Doc-ed some functions in Kernel32
- Added Netapi32.NetGetDCName
- Added Winbase with MAX_COMPUTER_NAME
- Added Kernel32.WaitForMultipleObjects

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1033 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 12:31:25 +00:00
Daniel Doubrovkine 11b4203874 Fixed w32util.jar distribution.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1032 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-24 22:37:53 +00:00
Daniel Doubrovkine 60beb432eb Running tests on windows only.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1031 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-24 21:00:21 +00:00
Daniel Doubrovkine 64331c9cf0 - Fixed eclipse build by adding an eclipse .project for contrib/src/w32util.
- Added W32util standalone build.xml, invoked from jna build.xml.
- Made all example.win32-s UNICODE.
- Ported Advapi32.LookupAccountName, LookupAccountSid from the NT service example to examples.win32 (pinvoke) and contrib.win32util (wrappers). Added tests for both pinvoke functions and wrappers.
- Renamed utility functions to lowercase for consistency in contrib.w32util.
- Added w32util.getAccountSid, getAccountName, convertSidStringToSid, 
convertSidToStringSid, etc. Fixed a crash in the converts.
- Added Netapi32Util.getLocalGroups.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1030 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-24 19:59:16 +00:00
Timothy Wall 00088d4093 add 'int' version of Pointer.createConstant
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1029 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-23 20:16:19 +00:00
Timothy Wall 472f3660e0 add test for INVALID_HANDLE_VALUE, add explicit long value
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1028 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-23 20:11:50 +00:00
Daniel Doubrovkine 3c13cc8c4d Added contrib folder to build, moved source into src and added test. Tests run in test targets.
Added w32util jar.
Fixed crash in Netapi32Test.
Fixed comment in Advapi32.java.
Moved baloontips into a package.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1027 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-23 16:01:30 +00:00
Timothy Wall 0792ac8eee fix INVALID_HANDLE_VALUE (64-bit)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1026 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-23 14:17:13 +00:00
Timothy Wall 4952af4ffe Fix INVALID_HANDLE_VALUE
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1025 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-23 14:14:54 +00:00
Daniel Doubrovkine 3fcca7ef56 Tentative fix for the broken Secur32Test UT: looks like on some OSs GetUserNAmeEx returns true when passed a null buffer and a size? Also fixed documentation warnings.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1024 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-22 23:50:01 +00:00
Daniel Doubrovkine e93244fef2 Advapi32:
GetUserNameW
 LookupAccountNameW
 ConvertSidToStringSidW
 ConvertStringSidToSidW
 GetLengthSid

Netapi32:
 NetGetJoinInformation
 NetApiBufferFree

Secur32:
 GetUserNameExW

W32Errors:
 Almost full port of winerror.h

Advapi32Util:
 GetUserName
 LookupAccountName
 ConvertSidToStringSid

Netapi32Util:
 GetDomainName

Secur32Util
 GetUserNameEx

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1023 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-22 22:54:09 +00:00
Anthony Green c3813b6d7f Rebuild Makefiles with automake 1.11.1 for CVE-2009-4029. 2010-01-26 16:48:56 -05:00
Anthony Green 8d27f68baa Mention recent changes in README 2010-01-15 11:35:37 -05:00
Anthony Green ff3cd68b8c Add msvc.sh wrapper 2010-01-15 11:27:24 -05:00
Anthony Green cadeba6cb5 Microsoft Visual C port 2010-01-15 10:46:51 -05:00
Anthony Green 0739e7dc00 Add x86 Sun Studio compiler support 2010-01-15 09:48:33 -05:00
Anthony Green edfdfd2e85 Add closure example doc 2010-01-13 02:56:19 -05:00
Anthony Green 7b7a42f221 Rebase from GCC 2010-01-12 09:14:14 -05:00
Timothy Wall acf75ce7fe fix read of NIO Buffer fields within structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1022 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-01-05 01:46:27 +00:00
Anthony Green 4b18d1f73d Add x86-64 MingW to README 2010-01-01 10:24:27 -05:00
Anthony Green c3042afaf3 Reset quilt patches post 3.0.9 merge with GCC 2010-01-01 08:08:02 -05:00
Anthony Green b0304e9679 Update version 2009-12-31 11:32:40 -05:00
Anthony Green 2e7e03d014 Final updates before 3.0.9 2009-12-31 07:43:22 -05:00
Anthony Green aea706c528 really 3.0.9rc12 2009-12-29 10:09:31 -05:00
Anthony Green 0cfe60e9d1 3.0.9rc12 2009-12-29 10:06:04 -05:00
Anthony Green 14e2e92e86 3.0.9rc11 2009-12-27 21:03:33 -05:00
Anthony Green 884402787b HPUX support and avr32 test fixes. 2009-12-26 12:57:23 -05:00
Anthony Green 01c78756af 3.0.9rc9 2009-12-26 10:05:18 -05:00
Anthony Green 7086846465 Remove xfails for mips and arm 2009-12-26 09:58:03 -05:00
Anthony Green 838d4ad920 Remove a bunch of xfails. 2009-12-26 09:57:27 -05:00
Anthony Green 7e37eaaf77 Fix huge_struct for solaris 2009-12-26 07:46:50 -05:00
Anthony Green 07cc7a3719 3.0.9rc8 2009-12-26 07:23:04 -05:00
Anthony Green 2b9be16ffa 3.0.9rc8 2009-12-26 07:04:45 -05:00
Anthony Green 9458d88f67 Rebase from GCC 2009-12-26 07:02:27 -05:00
Anthony Green 6a34124175 Add Andreas Schwab's powerpc fix 2009-12-26 06:51:33 -05:00
Anthony Green 39c8792ece 3.0.9rc7 2009-12-25 21:52:28 -05:00
Anthony Green 1d04af52e3 Updated some mips XFAILs 2009-12-25 09:50:36 -05:00
Anthony Green 26e9509c9b Clean up ChangeLog.libffi for older patches. 2009-12-25 02:19:23 -05:00
Anthony Green 9c157d3215 Clean up undefine_AC_ARG_VAR_PRECIOUS patch. 2009-12-25 02:15:40 -05:00
Anthony Green d22de05b0b Fix patches 2009-12-25 02:04:23 -05:00
Anthony Green 1fe3dc7c20 Add windows support patch. 2009-12-25 01:39:00 -05:00
Anthony Green f7c0bc613a 3.0.9rc6 2009-12-25 01:22:11 -05:00
Anthony Green c7fa2da826 3.0.9rc6 2009-12-24 07:22:44 -05:00
Anthony Green da11bece0f Release 3.0.9rc5 2009-12-24 05:34:46 -05:00
Anthony Green e3399b11ed Update README 2009-12-24 01:09:32 -05:00
Anthony Green 115ab36fce Update missing changes for 3.0.9r4. 2009-12-24 00:22:00 -05:00
Anthony Green f8c7a245bf Switch to quilt. Rebase to latest GCC. 2009-12-23 23:46:22 -05:00
philke 7560b6e53d added import java.util.Date;
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1021 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-12-21 18:57:12 +00:00
philke f5346bbec2 Removed @Override annotation to comply with 1.4 source code level
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1020 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-12-21 17:31:22 +00:00
philke 41958889fb Added FILETIME
Added functions for File Mapping
Added functions for Event handling
Added LocalAlloc

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1019 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-12-21 16:48:44 +00:00
Timothy Wall d439a7811d avoid auto-allocating structure memory if memory already provided
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1018 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-12-18 15:55:59 +00:00
Timothy Wall 4951c00d23 Ensure inherited structure fields are properly ordered
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1017 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-12-04 14:38:19 +00:00
Timothy Wall 202cd0d45e update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1015 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-11-20 13:57:19 +00:00
Timothy Wall 1502db6095 build 3.2.4
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1014 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-11-20 13:55:41 +00:00
Timothy Wall e8eea9e68e Fix issue 135
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1013 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-29 13:24:51 +00:00
Timothy Wall 396eb9f283 add linux/ia64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1012 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-29 13:15:22 +00:00
Dan Rollo 378f400226 increase ServerSocket timeout again. Further testing on pokey machine shows jnlp download time ~30secs, and verify/launch time also ~30secs. Two minutes should be plenty, even on the worst of days.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1011 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-25 01:23:06 +00:00
Dan Rollo 37e02dfbd5 increase ServerSocket timeout in attempt to make test tolerant of very slow machine.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1010 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-25 00:31:11 +00:00
Dan Rollo dce66ec8ec remove unused variables and unused imports
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1009 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-25 00:29:53 +00:00
Timothy Wall 2fef67a08d provide easier mapping from native pointer to Function object
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1008 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-24 15:43:53 +00:00
Timothy Wall 50a17583c7 include clover.jar in full source zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1007 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-20 14:54:18 +00:00
Timothy Wall bfe2c7df83 add COM to FAQ
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1006 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-16 13:08:02 +00:00
Timothy Wall b3186dde12 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1005 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-08 19:14:59 +00:00
Timothy Wall 628a33eb76 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1004 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-08 19:12:24 +00:00
Timothy Wall 4373e66b1e 3.2.3 release
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1002 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-08 19:03:44 +00:00
Timothy Wall 2e67b0ad9f update netbeans project
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1001 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-08 18:54:59 +00:00
Timothy Wall a4cbe0635f ensure version information is always available
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1000 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-08 18:54:07 +00:00
Timothy Wall 8563419280 note OSX
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@999 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-07 12:43:19 +00:00
Timothy Wall 0974bd4a90 properly include Java sources in maven source zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@998 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-07 12:39:28 +00:00
Timothy Wall e1d47adc99 add note for OSX under JNLP
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@997 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-07 12:33:02 +00:00
Anthony Green ce806772f0 Merge branch 'master' of git@github.com:atgreen/libffi 2009-10-05 00:41:35 -04:00
Anthony Green dcc1f6b4f1 More clean up. 2009-10-05 00:29:33 -04:00
Anthony Green 2829f5941a Clean up 2009-10-05 00:28:03 -04:00
Anthony Green cd98813de5 From Jens Rehsack. Fix for 64-bit AIX. 2009-10-05 00:25:29 -04:00
Anthony Green e4a91de766 From Abdulaziz Ghuloum. Adds special case for Snow Leopard. 2009-10-05 00:16:17 -04:00
Anthony Green 3425a763bc Fix detection of free/openbsd. From Alexis Ballier. 2009-10-04 23:57:29 -04:00
Anthony Green 2340e7a777 AVR support 2009-10-04 23:53:17 -04:00
Anthony Green 5cbe2058c1 Initial stand-alone patch. 2009-10-04 23:53:11 -04:00
Anthony Green c6dddbd02b Initial commit 2009-10-04 08:11:33 -04:00
Anthony Green 5ffc0c3748 Update version to 3.0.9rc1. Add more useful things to .gitignore. 2009-10-04 07:58:22 -04:00
Timothy Wall e5e171d913 fix TrayIcon mouseover exception in WindowUtils
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@996 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-04 01:01:54 +00:00
Timothy Wall 1e313227b8 remove apple-specific reference
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@995 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-03 23:42:01 +00:00
Timothy Wall 8d45a9e0cd fix transparent window toggle on OSX
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@994 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-02 20:02:00 +00:00
Timothy Wall 95568d76d3 fix win32 bug toggling windows transparent/opaque
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@993 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-02 18:51:03 +00:00
Timothy Wall d4a3442468 avoid overwriting unmodified Pointer objects
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@992 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-02 17:55:11 +00:00
Timothy Wall e262de22ea fix type declarations
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@991 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-29 20:30:15 +00:00
Anthony Green bd29f83ee9 Add .gitignore 2009-09-29 12:07:26 -04:00
Anthony Green 9474f853f8 Remove old CVSROOT files. 2009-09-29 11:13:02 -04:00
Timothy Wall 49243f1891 fix web start native library loading bugs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@990 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-21 17:10:56 +00:00
Timothy Wall 1a099ba549 no need to set layers transparent on osx
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@989 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-20 21:39:39 +00:00
Timothy Wall 2367133b4f move double buffer handling to a more appropriate location
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@988 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-17 13:15:12 +00:00
Timothy Wall c648a1933d fix double buffering bug on transparent windows
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@987 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-17 12:55:14 +00:00
Timothy Wall 598acf08da fix bug reading Structure.ByReference fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@986 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-14 12:46:08 +00:00
Timothy Wall 208a8dee90 fix email address
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@985 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-14 12:37:18 +00:00
Timothy Wall e9fb299565 fix comments/javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@984 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-20 12:10:30 +00:00
twall 0c25275ec2 Apply Dave Korn's cygwin/GCC changes 2009-08-19 12:57:34 +00:00
Timothy Wall 17a514ecd0 avoid writing final Structure fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@983 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-07 14:18:32 +00:00
Timothy Wall 38ac62cedd build 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@981 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-05 17:14:24 +00:00
Timothy Wall ce280731af only set javawebstart.version if not already set
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@980 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-05 14:17:37 +00:00
Timothy Wall 751fb57f71 fix web start test under NetX
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@979 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-05 14:07:41 +00:00
Timothy Wall be7d90abbf add length-specified Pointer.getStringArray()
update sunos-amd64.jar native
remove debug output

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@978 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-05 12:15:01 +00:00
Timothy Wall d59585dd4f update natives to 3.2.1
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@977 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-04 15:49:17 +00:00
Timothy Wall 7a695707a2 avoid potential error if dispatch fails due to bad arguments
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@976 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-04 14:01:06 +00:00
Timothy Wall 4e590c9450 fix issue 125
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@975 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-04 13:55:59 +00:00
Timothy Wall b069d1c9e9 add direct version of struct by value tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@974 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-04 13:22:44 +00:00
Timothy Wall 9fa1f7b981 fix bug writing null-valued ByReference structure fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@973 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-31 20:57:57 +00:00
Timothy Wall 4a68e4cd9d canonicalize auto-sync of structure arrays
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@972 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-31 16:58:15 +00:00
Timothy Wall 8320b6fd7c add missing direct mappings for new tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@971 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-31 16:44:29 +00:00
Timothy Wall e40cf0a1c4 synch callback structure args on callback return
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@970 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-28 20:00:13 +00:00
Timothy Wall 19106985d7 remove debug output
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@969 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-27 22:40:33 +00:00
Timothy Wall 3d817c54da add array wrapping tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@968 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-27 22:38:35 +00:00
Timothy Wall ca31877107 find proper c library automatically, avoids ubuntu crash
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@967 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-27 13:41:16 +00:00
Timothy Wall f5f9afefb0 avoid Structure.equals in read/write
reduce overhead of Structure.toString when struct contents aren't actually used

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@966 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-27 01:33:15 +00:00
Timothy Wall d42863603e fix Structure equals/hashcode
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@964 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-26 16:53:26 +00:00
Timothy Wall 2c19cf3e31 fix definition of HWND_BROADCAST
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@963 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-25 14:42:35 +00:00
Timothy Wall e7dc918c6a use non-null conversion context
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@962 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-21 14:02:58 +00:00
Timothy Wall 64c9e8212a update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@961 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-21 13:45:43 +00:00
Timothy Wall 499c39f13d build linux/i386 against older glibc (2.3.4) for compatibility
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@959 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-17 18:12:48 +00:00
Timothy Wall bccdae735b rename native method according to Java class rename
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@958 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-17 02:52:47 +00:00
Timothy Wall 58120730a5 update notes on direct mapping
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@957 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-16 20:08:09 +00:00
Timothy Wall 5b8db8a680 add direct mapping note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@956 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-15 13:50:54 +00:00
Timothy Wall 0acfd583c8 add jnaerator note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@955 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-15 13:40:27 +00:00
Timothy Wall 402b7ef67e add marc strapetz' patch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@954 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-15 13:05:36 +00:00
Timothy Wall 6944871c42 fix issue #121
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@953 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-15 13:03:53 +00:00
Timothy Wall b60da35689 update direct mapping info
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@952 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 19:24:16 +00:00
Timothy Wall 5204feddb1 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@951 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 18:10:29 +00:00
Timothy Wall 68156df66b update native libraries
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@949 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 18:03:48 +00:00
Timothy Wall a9e8b27285 ensure proper method selection when java callback returns NativeMapped
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@948 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 17:46:01 +00:00
Timothy Wall b8f470ddbd fix compilation warnings/errors on win64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@947 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 15:28:36 +00:00
Timothy Wall 9d075dd1d1 revert configury changes, incompatible w/ windows build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@946 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 13:30:49 +00:00
Timothy Wall 4b802c6f60 update configury
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@945 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-13 20:50:27 +00:00
Timothy Wall 8ce9344dd0 update from libffi CVS (local patches applied upstream)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@944 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-13 14:15:02 +00:00
Timothy Wall cb2b386791 document getProcess usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@943 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-08 01:25:01 +00:00
Timothy Wall 7ee4681c10 enable accessing current process on w32
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@942 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 16:37:27 +00:00
Timothy Wall 82c0ea9df2 add test for NativeLibrary.getProcess()
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@941 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 15:39:16 +00:00
Timothy Wall 9070d80880 re-throw errors as errors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@940 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 12:57:18 +00:00
Timothy Wall 45c53caf94 increase JWS timeout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@939 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 11:56:17 +00:00
Timothy Wall c4947618c1 distinguish expected web start error from other errors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@938 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 11:28:05 +00:00
Timothy Wall 941ed59c37 make structure read/write recursion detection thread-local
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@937 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 11:13:32 +00:00
Timothy Wall d76bbec1ab fix web start test for IBM J9
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@936 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 10:54:37 +00:00
Timothy Wall f5a1d98cf9 ensure clover.jar is signed
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@935 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 23:56:57 +00:00
Timothy Wall b0e6d837f0 provide toByteArray with String encoding option
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@934 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 13:28:28 +00:00
Timothy Wall b1cfb1b733 fix web start test on linux
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@933 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 13:15:04 +00:00
Timothy Wall 26a1212546 bump version, md5
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@932 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 10:49:59 +00:00
Timothy Wall 03b05aaae9 add test for callbacks w/type mapper w/differently-sized return types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@931 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 10:29:59 +00:00
Timothy Wall f41c87d7c9 fix failing test on osx
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@930 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 10:21:13 +00:00
Timothy Wall b74deb5e35 narrow direct callback test failure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@929 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 02:36:34 +00:00
Timothy Wall 240e2db637 improve test coverage, structure field error messages
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@928 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 01:09:07 +00:00
Timothy Wall 441947b6a4 ensure direct library mappings used in direct tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@927 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 01:06:40 +00:00
Timothy Wall 194bdaffcd add unicode equivalents
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@926 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-02 12:23:00 +00:00
Timothy Wall db6e9ff4c6 fix compiler warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@925 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-01 15:47:09 +00:00
Timothy Wall 57261a1164 more performance notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@924 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-01 12:25:53 +00:00
Timothy Wall 0b116bb409 throw call errors *after* any cleanup
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@923 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-30 19:00:47 +00:00
Timothy Wall a5ad2e5de2 enable web start test on windows
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@922 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-26 20:06:25 +00:00
Timothy Wall b6928ff6c0 add test for auto-write of Structure.ByReference arrays
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@921 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-26 18:17:12 +00:00
Timothy Wall 4b03dd321c fix placement of exception throw
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@920 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-26 02:48:09 +00:00
Timothy Wall f7eefbd3d7 avoid making JNI calls after thrown exceptions
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@919 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 22:49:15 +00:00
Timothy Wall b23f7f9b27 fix setjmp/longjmp compiler warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@918 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 15:41:37 +00:00
Timothy Wall b95bc7e4c4 remove redundant (and unreliable) test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@917 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 15:29:27 +00:00
Timothy Wall 1593c0c347 add IBM J9 notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@916 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 15:26:13 +00:00
Timothy Wall c154663455 fix tests on windows
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@915 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 15:24:00 +00:00
Timothy Wall 13bc1901dc merge direct branch to trunk
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@913 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 13:58:15 +00:00
Timothy Wall 4f28322ac2 add ignores, update eclipse classpath
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@909 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 13:07:34 +00:00
Timothy Wall 756e2ced8b add web-start tests and test support
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@908 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 13:06:16 +00:00
Timothy Wall 1dc78b5209 fix typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@907 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-24 21:45:49 +00:00
Timothy Wall 3464093273 fix exception type
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@905 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-23 18:51:11 +00:00
Timothy Wall 4487214494 attempt to delete temporary native library in test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@901 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-22 17:49:09 +00:00
Timothy Wall 6d7e222946 add direct mapping note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@900 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-22 17:27:15 +00:00
Timothy Wall d12a6a3178 improve test coverage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@899 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-21 19:50:29 +00:00
Timothy Wall ed9d609c35 provide more info in test failures
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@898 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-20 19:04:06 +00:00
Timothy Wall b86f359d93 Fix memory test on IBM J9
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@897 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-20 02:01:36 +00:00
Timothy Wall 02080dfcf8 fix tests on IBM J9 (windows) VM
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@896 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-20 01:54:37 +00:00
Timothy Wall 2768d25884 Fix test failures on IBM J9
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@895 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-20 00:11:21 +00:00
Timothy Wall 7bdf9896d2 Fix test failures on IBM J9
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@894 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-20 00:08:59 +00:00
Timothy Wall 3b4f84ded8 allow NativeMapped[] as function arguments
respect autoread/write structure setting in direct calls

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@893 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-19 17:05:57 +00:00
Timothy Wall 69abc52731 make tests independent of load order
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@892 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-19 01:40:43 +00:00
Timothy Wall 1671b1fb8b allow types derived from Buffer as Structure fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@891 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 21:26:24 +00:00
Timothy Wall 8735f4ef5c fix kernel32 function lookup
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@890 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 18:55:46 +00:00
Timothy Wall 86967b5786 fix w32 compilation errors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@889 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 16:23:32 +00:00
Timothy Wall ca8ceeb130 remove debug output
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@888 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 15:15:24 +00:00
Timothy Wall 41d6f8eeea add last error exception for direct calls
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@887 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 14:34:57 +00:00
Timothy Wall 27b7805608 Handle last error as an exception if declared
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@886 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 14:12:18 +00:00
aph 39228c27ed 2009-06-16 Wim Lewis <wiml@hhhh.org>
* src/powerpc/ffi.c: Avoid clobbering cr3 and cr4, which are
	supposed to be callee-saved.
	* src/powerpc/sysv.S (small_struct_return_value): Fix overrun of
	return buffer for odd-size structs.
2009-06-16 18:00:47 +00:00
aph 5e93cc704d 2009-06-16 Andreas Tobler <a.tobler@schweiz.org>
PR libffi/40444
	* testsuite/lib/libffi-dg.exp (libffi_target_compile): Add
	allow_stack_execute for Darwin.
2009-06-16 17:41:47 +00:00
aph b509af8959 2009-06-16 Andrew Haley <aph@redhat.com>
* configure.ac (TARGETDIR): Add missing blank lines.
	* configure: Regenerate.
2009-06-16 16:17:52 +00:00
Timothy Wall fef39f7013 replace atexit example
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@885 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-16 10:31:24 +00:00
aph d57e96dc56 2009-06-16 Andrew Haley <aph@redhat.com>
* testsuite/libffi.call/cls_align_sint64.c,
        testsuite/libffi.call/cls_align_uint64.c,
        testsuite/libffi.call/cls_longdouble_va.c,
        testsuite/libffi.call/cls_ulonglong.c,
        testsuite/libffi.call/return_ll1.c,
        testsuite/libffi.call/stret_medium2.c: Fix printf format
        specifiers.
        * testsuite/libffi.call/huge_struct.c: Ad x86 XFAILs.
        * testsuite/libffi.call/float2.c: Fix dg-excess-errors.
        * testsuite/libffi.call/ffitest.h,
        testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRIuLL): Define.
2009-06-16 09:59:02 +00:00
aph b01d6d1982 2009-06-16 Andrew Haley <aph@redhat.com>
* testsuite/libffi.call/err_bad_typedef.c: xfail everywhere.
	* testsuite/libffi.call/err_bad_abi.c: Likewise.
2009-06-16 09:44:54 +00:00
Timothy Wall b414b54c6b fix callback example
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@884 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-15 20:19:46 +00:00
aph 35b6ded138 2009-06-11 Kaz Kojima <kkojima@gcc.gnu.org>
* testsuite/libffi.call/cls_longdouble_va.c: Add xfail sh*-*-linux-*.
        * testsuite/libffi.call/err_bad_abi.c: Add xfail sh*-*-*.
        * testsuite/libffi.call/err_bad_typedef.c: Likewise.
2009-06-12 15:29:20 +00:00
aph acc46605f2 2009-06-12 Andrew Haley <aph@redhat.com>
* ChangeLog.libffi: testsuite/libffi.call/cls_align_sint64.c,
        testsuite/libffi.call/cls_align_uint64.c,
        testsuite/libffi.call/cls_ulonglong.c,
        testsuite/libffi.call/return_ll1.c,
        testsuite/libffi.call/stret_medium2.c: Fix printf format
        specifiers.
        testsuite/libffi.special/unwindtest.cc: include stdint.h.
2009-06-12 14:21:28 +00:00
twall 16d1996ed0 update changelog 2009-06-11 14:27:42 +00:00
twall 92a515c33e use ffi_closure_alloc instead of stack-based closure 2009-06-11 14:27:28 +00:00
twall e4363160ba remove unused extern 2009-06-11 14:26:23 +00:00
twall 1dc2781d2b remove not-yet-applied changelog entries 2009-06-11 11:36:16 +00:00
Timothy Wall ccdbb20ad0 facilitate struct members pointing to arrays of struct
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@877 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-10 13:26:57 +00:00
Timothy Wall eb7e47bf29 doc various structure type mappings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@876 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-10 13:23:53 +00:00
twall bb27735fe6 add win64 support 2009-06-10 10:42:36 +00:00
aph b2a54c100c 2009-06-08 Andrew Haley <aph@redhat.com>
* testsuite/libffi.call/err_bad_abi.c: Add xfails.
	* testsuite/libffi.call/cls_longdouble_va.c: Add xfails.
	* testsuite/libffi.call/cls_dbls_struct.c: Add xfail x86_64-*-linux-*.
	* testsuite/libffi.call/err_bad_typedef.c: Add xfails.

	* testsuite/libffi.call/stret_medium2.c: Add __UNUSED__ to args.
	* testsuite/libffi.call/stret_medium.c: Likewise.
	* testsuite/libffi.call/stret_large2.c: Likewise.
	* testsuite/libffi.call/stret_large.c:  Likewise.
2009-06-08 16:50:49 +00:00
Timothy Wall 53988c7184 update clover library
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@874 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-08 13:45:15 +00:00
Timothy Wall 9092b2bdc5 add VM information to build output
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@873 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-07 12:19:29 +00:00
Timothy Wall 068353aa5b ensure temp test unicode-named library deleted
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@872 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-07 12:07:27 +00:00
Timothy Wall 95a17ddbf0 attempt to find cause of w32 cleanup failure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@869 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-06 11:45:09 +00:00
Timothy Wall 6c8c455f5b fix compiler warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@868 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-06 00:31:18 +00:00
Timothy Wall 282032e178 give FS more time to delete native lib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@867 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-05 22:31:54 +00:00
Timothy Wall af63e6a80d account for VM implementations returning 'null' as a classloader
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@866 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-05 19:52:06 +00:00
Timothy Wall a46ba0da29 restrict installation of shudown hook
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@865 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-05 19:37:56 +00:00
Timothy Wall f7738bf65b Add tests for library unloading and loading from jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@864 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-05 17:18:08 +00:00
Timothy Wall bb11d1fe37 unload native library unpacked from jar if Native class unloaded
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@863 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-05 15:33:51 +00:00
aph 25723e7141 2009-06-05 Andrew Haley <aph@redhat.com>
* src/x86/win32.S (_ffi_closure_STDCALL): Import from gcc.
2009-06-05 13:03:40 +00:00
aph 70758199c7 2009-06-04 Andrew Haley <aph@redhat.com>
* src/powerpc/ffitarget.h: Fix misapplied merge from gcc.
2009-06-04 16:29:58 +00:00
aph e8bb12563f 2009-06-04 Andrew Haley <aph@redhat.com>
* src/mips/o32.S,
	src/mips/n32.S: Fix licence formatting.
2009-06-04 14:59:18 +00:00
Timothy Wall d02a2deb52 update front page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@859 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-04 14:52:04 +00:00
aph d66a8e32c3 2009-06-04 Andrew Haley <aph@redhat.com>
* src/x86/darwin.S: Fix licence formatting.
	src/x86/win32.S: Likewise.
	src/sh64/sysv.S: Likewise.
	src/sh/sysv.S: Likewise.
2009-06-04 14:43:40 +00:00
aph 7c3b7fd6b5 2009-06-04 Andrew Haley <aph@redhat.com>
* src/sh64/ffi.c: Remove lint directives.  Was missing from merge
	of Andreas Tobler's patch from 2006-04-22.
2009-06-04 14:39:20 +00:00
aph 1a2f93a8b3 2009-06-04 Andrew Haley <aph@redhat.com>
* src/sh/ffi.c: Apply missing hunk from Alexandre Oliva's patch of
        2007-03-07.
2009-06-04 10:45:51 +00:00
aph 944c95cf7a 2009-05-22 Dave Korn <dave.korn.cygwin@gmail.com>
* src/x86/win32.S (_ffi_closure_STDCALL):  New function.
       (.eh_frame):  Add FDE for it.

2009-05-22  Dave Korn  <dave.korn.cygwin@gmail.com>

       * configure.ac:  Also check if assembler supports pc-relative
       relocs on X86_WIN32 targets.
       * configure:  Regenerate.
       * src/x86/win32.S (ffi_prep_args):  Declare extern, not global.
       (_ffi_call_SYSV):  Add missing function type symbol .def and
       add EH markup labels.
       (_ffi_call_STDCALL):  Likewise.
       (_ffi_closure_SYSV):  Likewise.
       (_ffi_closure_raw_SYSV):  Likewise.
       (.eh_frame):  Add hand-crafted EH data.

2008-11-21  Eric Botcazou  <ebotcazou@adacore.com>

       * src/sparc/ffi.c (ffi_prep_cif_machdep): Add support for
       signed/unsigned int8/16 return values.
       * src/sparc/v8.S (ffi_call_v8): Likewise.
       (ffi_closure_v8): Likewise.

2008-03-26  Kaz Kojima  <kkojima@gcc.gnu.org>

       * src/sh/sysv.S: Add .note.GNU-stack on Linux.
       * src/sh64/sysv.S: Likewise.

2008-03-26  Daniel Jacobowitz  <dan@debian.org>

       * src/arm/sysv.S: Fix ARM comment marker.
2009-06-03 17:42:56 +00:00
Timothy Wall 46105d849d add link to IAXClient applet
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@854 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-02 16:09:09 +00:00
Timothy Wall f16b6c3482 Omit JNA+AWT load test on headless systems
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@849 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-28 16:55:23 +00:00
Timothy Wall a9cb497045 allow callbacks in direct mappings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@848 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-28 16:12:39 +00:00
Timothy Wall d529a34ecb revert last change
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@847 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-28 13:31:45 +00:00
Timothy Wall 5394029dc5 dynamically load libjsig if available
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@846 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-28 13:07:04 +00:00
Timothy Wall 28247737ca fix typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@845 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-27 20:01:14 +00:00
Timothy Wall 6448c2d8fb pass options to native library at interface definition
update javadoc to include direct mapping info

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@844 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-27 20:00:02 +00:00
Timothy Wall 4460ccc8ec fix SIGBUS/SIGSEGV on sparc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@843 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-27 13:02:46 +00:00
Timothy Wall 2b02a3c533 fix direct struct by value mapping
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@842 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-27 12:57:07 +00:00
Timothy Wall 6705513b86 add structure, string, NIO Buffer and primitive array support to direct type mapping
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@841 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-26 20:09:05 +00:00
Timothy Wall 4bd8d12481 use more appropriate exception types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@840 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-26 19:55:15 +00:00
Timothy Wall ccaf3c283b avoid premature GC of Memory with NIO Buffers extant
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@839 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-26 19:54:26 +00:00
Timothy Wall ce4276a0cb fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@838 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:17:27 +00:00
Timothy Wall 709e316e56 fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@837 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:16:30 +00:00
Timothy Wall e46635d6ab fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@836 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:15:57 +00:00
Timothy Wall 0af8677ba4 fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@835 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:13:40 +00:00
Timothy Wall 9ab13daf09 fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@834 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:04:42 +00:00
Timothy Wall 17977fbabc fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@833 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:02:42 +00:00
xylo 83854047b7 reverted inadvertently adding another file in last commit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@832 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 14:27:04 +00:00
xylo 28e56fd587 added a note that Xevie has been removed from xserver
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@831 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 14:21:49 +00:00
Timothy Wall 29fc6308b8 doc tweaks
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@830 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 13:35:23 +00:00
Timothy Wall 14a7df128d add missing header
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@829 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 13:27:15 +00:00
Timothy Wall dd4ef89d0a update main page w/direct calling info
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@828 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 13:23:33 +00:00
Timothy Wall 830ec91cbf update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@826 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 21:16:37 +00:00
Timothy Wall aee2d55fab update natives, jna.jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@825 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 21:12:55 +00:00
Timothy Wall 89ed7982e7 update native lib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@824 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 21:04:04 +00:00
Timothy Wall 9f702c89ab update native libs (sunos)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@823 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 20:55:33 +00:00
Timothy Wall 2f76efd0f6 update native lib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@822 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 20:09:26 +00:00
Timothy Wall fae18c72c3 update native lib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@821 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 19:54:05 +00:00
Timothy Wall 1586f6ee2b update native libs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@820 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 19:45:19 +00:00
Timothy Wall 4ce6214526 update native lib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@819 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 14:36:45 +00:00
Timothy Wall e370e4b65e update native jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@818 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 14:08:14 +00:00
Timothy Wall 944de2d3f5 update native jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@817 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 13:50:29 +00:00
Timothy Wall f32146368d prep for 3.1 release
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@816 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 13:49:42 +00:00
Timothy Wall 8d45e9b016 add notes to setProtected javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@815 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 14:23:56 +00:00
Timothy Wall 70227861ff use libjsig.so if available
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@814 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 14:15:13 +00:00
Timothy Wall 20e542516b make gc more robust on sparc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@813 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 13:35:29 +00:00
Timothy Wall 73ad21df73 add link to windows mobile implementation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@812 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 11:02:52 +00:00
Timothy Wall a67fe7e43d %0@& windows
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@811 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 10:36:10 +00:00
Timothy Wall a15ddd9f88 blank checksum between releases
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@810 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 10:22:00 +00:00
Timothy Wall b27f9bf930 fix docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@809 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 10:13:54 +00:00
Timothy Wall d5c28f98f1 fix javadoc errors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@808 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 10:10:10 +00:00
Timothy Wall 16b283ed00 add raw call convention notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@807 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 10:04:41 +00:00
Timothy Wall 97b43889a1 add raw calling convention
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@806 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 09:54:12 +00:00
Timothy Wall 05efa12411 make callback gc test more robust
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@805 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 21:11:41 +00:00
Timothy Wall 3e60495232 clean up win64 patch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@804 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 20:44:36 +00:00
Timothy Wall 45522b0710 win32 tweaks, update native jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@803 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 16:08:52 +00:00
Timothy Wall d67d25eb7b remove extraneous output
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@802 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 15:47:06 +00:00
Timothy Wall 2538690fb4 unions require a structure-based ffi_type
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@801 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 15:31:12 +00:00
Timothy Wall 4c23b2518e protect old x86 code from win64 changes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@800 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 15:22:07 +00:00
Timothy Wall 9daade9816 fix compiler warning in 'sizeof'
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@799 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-14 18:43:11 +00:00
Timothy Wall 5f925f0070 correct OVERLAPPED types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@798 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-14 18:40:36 +00:00
Timothy Wall 38b0cd7780 provide sizeof native function, update checksum
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@797 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-12 17:32:24 +00:00
Timothy Wall e46391042b regenerated config files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@796 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-12 14:33:50 +00:00
Timothy Wall 553a03b05f ensure sufficient space allocated for win64 ffi_call stack
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@795 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-11 21:27:01 +00:00
Timothy Wall 24c1cc4efe fix 1 byte struct by value return
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@794 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-11 15:19:09 +00:00
Timothy Wall f6eabe7b58 down to 2 failing tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@793 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-11 14:49:18 +00:00
Timothy Wall de2de1fdc7 fix win64 fp return
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@792 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-11 01:08:05 +00:00
Timothy Wall 8184ac8843 more win64 fixes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@791 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-09 04:22:30 +00:00
Timothy Wall a57d82d4cd mark more xfail (no long double)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@790 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-09 02:20:30 +00:00
Timothy Wall a266ef7337 fix some win64 bugs with structure handling
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@789 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-09 01:59:31 +00:00
Timothy Wall b30ca23180 fix a few win64 tests
use ffi_closure_alloc everywhere

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@788 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-08 22:10:53 +00:00
Timothy Wall db5c8f00fc make union test more reliable for 64-bit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@787 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-08 14:14:47 +00:00
Timothy Wall d1bbacb06e fix docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@786 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-20 19:17:40 +00:00
Timothy Wall bff4e3b0fd optionally allow Java objects in native calls
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@785 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-20 15:27:29 +00:00
Timothy Wall 14248ddbd9 update Union ctor signatures
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@784 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-17 15:47:04 +00:00
Timothy Wall 391f39d291 fix issue 111
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@783 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-15 02:45:40 +00:00
Timothy Wall b4354efa8b set binary mime type
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@782 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-13 17:53:37 +00:00
Timothy Wall 686588a6e5 fix typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@781 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-06 13:15:09 +00:00
Timothy Wall 294267a605 Remove non-functional and superfluous size-based Structure ctors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@780 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-06 13:11:29 +00:00
Timothy Wall 7b53b9108b fix unused parameter warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@779 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-31 20:14:35 +00:00
Timothy Wall 15be9ab501 fix compiler warning
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@778 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-30 22:17:18 +00:00
Timothy Wall 7cfcd2daef Allow direct Buffer as structure field
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@777 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-30 21:06:03 +00:00
Timothy Wall 6070429eec tests for union by value fix
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@776 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-30 19:18:53 +00:00
Timothy Wall b5f41ef6c7 fix cacheing of union type information
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@775 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-28 13:02:02 +00:00
ochafik 716588a8fb Added mention to JNAerator's author
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@774 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-26 20:06:56 +00:00
Timothy Wall 95bc92f005 add some projects
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@773 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-26 17:19:13 +00:00
Timothy Wall 23425abe9d add tests to check for proper base addresses for structure/union fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@772 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-25 17:35:07 +00:00
Timothy Wall 3bab5e1e78 set RTLD_GLOBAL flag
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@771 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-18 13:44:57 +00:00
Timothy Wall 79ed7e81b1 update maven2 repo url (see http://weblogs.java.net/blog/kohsuke/archive/2009/03/changes_to_the.html)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@770 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-10 01:43:03 +00:00
Timothy Wall a59e58cc94 Allow handling of uncaught callback exceptions
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@769 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-09 13:52:16 +00:00
Timothy Wall 72bd12e394 note fix for issue #98
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@768 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-24 22:08:43 +00:00
Timothy Wall 2c667ca016 fix issue #104
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@767 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-24 22:04:22 +00:00
Timothy Wall 209c4d724f make Memory less restrictive
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@766 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-24 22:01:59 +00:00
Timothy Wall 95cf641f50 add w64 testsuite patches
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@765 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-24 17:50:07 +00:00
Wayne Meissner 85750fd065 Small optimization of NativeString constructor - do the String writing
here instead of via Pointer#setString(), to avoid converting the String
to bytes twice.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@764 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-16 09:33:33 +00:00
Wayne Meissner 402b5c7f81 Bump JNI version for the native change in previous commit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@763 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-13 00:50:10 +00:00
Wayne Meissner be6f52b796 Apply patch from issue #98 - support opening current process on Unix
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@762 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-13 00:39:13 +00:00
Timothy Wall f4e6c6ad94 Provide pointer-based ctor for Structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@761 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-02 16:11:16 +00:00
Timothy Wall 99fe59cee9 update release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@760 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-02 14:40:58 +00:00
Timothy Wall 0e80ba8b91 fix contents of maven source zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@759 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-02 14:39:57 +00:00
Timothy Wall 8965efdce1 update MSVC note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@758 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-25 21:50:27 +00:00
Timothy Wall 1393a94804 fix win64 setup
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@757 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-17 03:06:05 +00:00
Timothy Wall 52e558d877 apply patch for issue #95
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@756 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-14 00:34:32 +00:00
Timothy Wall d9948105f1 fix issue #51
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@755 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-14 00:28:10 +00:00
Timothy Wall 87c91c1c04 use direct path to resource compiler
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@754 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-07 22:10:50 +00:00
Timothy Wall f15e471371 fix compile under msvc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@753 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-07 22:01:56 +00:00
Timothy Wall fc0a83933d Synch to libffi 1.0.8
Add win64 patches from Kai Tietz

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@752 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-07 15:56:48 +00:00
Timothy Wall f1cf2fe218 use stdint types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@751 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-07 15:52:00 +00:00
Timothy Wall 7a5679cb65 fix misleading error message
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@750 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-06 22:22:22 +00:00
twall 00fa972430 properly glob-match 2008-12-27 16:59:05 +00:00
twall f5179e6794 Mark XFAIL on longdouble tests for x86_64/mingw 2008-12-26 19:06:28 +00:00
twall 80e2b5a749 clean up tests for win64 use 2008-12-22 15:21:15 +00:00
xylo 571b4604db added a comment on contrib/x11 to the release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@749 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-12-21 14:17:16 +00:00
xylo 29e15a40db in contrib/x11: tidy up build.xml
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@748 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-12-20 18:04:23 +00:00
xylo 6fb2286fa4 added a build.xml
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@747 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-12-20 17:53:43 +00:00
xylo ab2f78c7b4 add the "x11" contribution containing an object oriented interface to X11
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@746 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-12-20 16:22:21 +00:00
green 7063d9996f Version 3.0.8 with x86-solaris support 2008-12-19 16:13:46 +00:00
green bdfeb13f0d Bump to 3.0.7 2008-12-19 15:47:44 +00:00
Timothy Wall f9b918a05b synch with libffi 3.0.6 CVS - affects darwin, freebsd
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@745 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-12-16 15:42:55 +00:00
Timothy Wall a46cde174a clean up release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@744 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-11-13 17:17:23 +00:00
Timothy Wall 6eee0f8741 clean up relnotes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@743 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-11-03 13:46:17 +00:00
Timothy Wall 28d31bb9f6 add small struct return by value test
Fix issue #94

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@742 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-11-03 13:42:03 +00:00
xylo 23128be17f in X11: added some methods related to key handling of the X server and added the XTest library/extension
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@741 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-11-02 18:35:59 +00:00
Wayne Meissner 130885fda7 3.0.9 release
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@739 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-30 20:22:28 +00:00
Wayne Meissner c4fc42f8f4 Bump version to 3.0.9 and update release-notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@738 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-30 20:17:14 +00:00
Wayne Meissner 21e73c5fb9 Fix for issue #93 and JRUBY-3084.
This alters the library search algorithm slightly:
1) Searches jna.library.path and any custom (per-library) paths for a
   matching library.
2) If that fails, tries to load the mapped library name, using
   dlopen/LoadLibrary.
3) If that fails, add all paths back into the search path and try to locate
   the library in jna.platform.library.path with all the normal fallbacks.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@737 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-29 00:30:54 +00:00
Wayne Meissner b635bf5591 Build 3.0.8
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@735 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-18 21:01:42 +00:00
Timothy Wall be594bb1f6 provide String->primitive array conversion
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@734 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-17 17:29:32 +00:00
Timothy Wall 543e3fca98 add more return types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@733 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-15 02:56:51 +00:00
Wayne Meissner b385d76dc6 Add support for jna.boot.library.path property. This is a list of paths to attempt to load the jna stub library from. Its needed by JRuby and possibly Jython, to load the stub library from the file system, as they both put jna.jar in -Xbootclasspath, and java.library.path/LD_LIBRARY_PATH are ignored in that situation.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@732 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-12 06:02:31 +00:00
Timothy Wall 2adc88fec3 fix build of dependent test library on w32-x86
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@731 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-08 12:33:58 +00:00
Timothy Wall 2a9e2ceb61 support notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@730 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-07 11:13:40 +00:00
Timothy Wall 47fa804469 bump version
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@728 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-01 13:44:23 +00:00
Timothy Wall f70c01eee7 fix broken link
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@727 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-01 13:37:10 +00:00
Timothy Wall eb4ea07a2d update win32 natives
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@726 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-01 13:37:01 +00:00
Timothy Wall 55cd72baaa Fix class cast exception
read all TYPE_MAPPERs regardless of access

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@725 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-29 12:20:56 +00:00
Timothy Wall 940076d101 update demo files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@724 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-26 00:41:56 +00:00
Timothy Wall 93ebb9f7a9 improve win32 dependent library loading
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@723 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-22 15:55:59 +00:00
Timothy Wall 1a17ea52d8 add win64 target
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@718 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-17 18:14:49 +00:00
Timothy Wall 68bc0c0c7c add win64 target
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@717 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-17 18:09:40 +00:00
Timothy Wall 0e7dd6b350 note Memory vs primitive array usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@716 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-17 12:21:23 +00:00
Timothy Wall b3b0bf3845 note Memory vs primitive array usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@715 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-17 12:17:58 +00:00
Timothy Wall ddc32f1e43 update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@714 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-16 18:25:25 +00:00
Timothy Wall c9de508a2c 3.0.6 build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@712 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-16 18:15:53 +00:00
Timothy Wall fac68bca4e update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@711 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-14 20:11:57 +00:00
Timothy Wall eaf250c3c6 struct/union improvements
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@710 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-12 14:05:07 +00:00
Timothy Wall 8b99772d29 clean up field type checking
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@709 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-11 18:34:54 +00:00
Timothy Wall 862a32e97e Fix pointer field read bug
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@708 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-11 17:23:48 +00:00
Timothy Wall 6cfb84d6ee more mingw-64 fixes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@707 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-11 14:01:49 +00:00
xylo 2fda7ca6f6 in Union: added methods getTypedValue() and setTypedValue() as abridgment for the commands u.setType(), u.read(), x = u.field; also added corresonding tests to class UnionTest
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@706 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-11 05:48:17 +00:00
Timothy Wall f2aecb53bc fix configure/build with mingw-64 (tests still fail)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@705 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-11 03:19:41 +00:00
Timothy Wall 05fdc2f17a update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@704 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-10 17:21:11 +00:00
xylo b9868b993c take X11 from x11-addons branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@703 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-10 17:16:22 +00:00
Wayne Meissner 573d8eefd1 Updated i386-OpenBSD build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@702 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-10 15:28:33 +00:00
Timothy Wall 51d64f29e6 clean up some libffi bits
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@700 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-09 15:08:58 +00:00
Timothy Wall a39ab60ae5 update natives
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@698 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 15:30:23 +00:00
Timothy Wall ba9671fae5 update natives
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@697 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 15:21:04 +00:00
Timothy Wall a9340f354d update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@696 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 14:59:09 +00:00
Timothy Wall f9d6b069f7 update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@695 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 14:50:59 +00:00
Timothy Wall c363d5790d update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@694 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 14:38:54 +00:00
Timothy Wall 15a50d2a26 update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@693 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 14:29:43 +00:00
Timothy Wall bffc188151 bump revision
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@692 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 13:06:41 +00:00
Timothy Wall e78205430c update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@691 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 13:05:23 +00:00
Timothy Wall 4ef76d4f85 Allow arbitrary callback method names
Allow specification of callback type mapper with TYPE_MAPPER
Allow write with uninitialized boxed primitives in Structure
Fix memory leak with callbacks called from native threads w/no java context
Fix Structure derived classes to allow setting TypeMapper

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@690 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 12:56:04 +00:00
Timothy Wall 967da46793 Fix memory leak in callbacks
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@689 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-07 17:32:02 +00:00
xylo 46899503bd take X11 from x11-addons branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@686 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-06 17:24:37 +00:00
Timothy Wall 2dcf0f774c add win64 note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@685 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-04 15:34:24 +00:00
Timothy Wall d669db0cab update jars with win64 build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@684 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-04 15:29:52 +00:00
Timothy Wall f8aabcc50a merge win64 branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@683 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-04 15:04:34 +00:00
Timothy Wall 4bb3ece8dc Fix transparent window error on win2k
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@669 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-01 19:33:56 +00:00
Timothy Wall 495a7765d2 include LICENSE.txt in src.zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@648 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-26 13:39:46 +00:00
Timothy Wall 225296f253 avoid more content dragging on OSX, or warn
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@647 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-22 14:35:27 +00:00
Timothy Wall 52e6900e7a fix typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@645 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-14 14:56:01 +00:00
Timothy Wall 557bff1465 update doc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@644 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-14 14:53:14 +00:00
Timothy Wall add32ac107 bump version
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@643 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-14 14:52:56 +00:00
Timothy Wall f7699b98fb release 3.0.5
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@641 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-14 14:47:41 +00:00
Timothy Wall 05a8ec1fec add java.net maven repo plumbing
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@640 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-14 14:33:01 +00:00
Timothy Wall 004e63c433 allow String[] as callback argument/return
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@639 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-13 14:17:40 +00:00
Timothy Wall 898f41b95a avoid reallocating Integer objects
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@638 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-13 13:51:59 +00:00
Timothy Wall 859a6a75aa apply patch #81
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@637 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-09 12:10:11 +00:00
Timothy Wall b90dae6448 add sunos-sparc build compatible with solaris 8
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@636 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-08 04:45:14 +00:00
Timothy Wall dc1ddf4cff add usb for java
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@635 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-08 04:37:37 +00:00
Timothy Wall 46ef5d86c3 add usb for java
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@634 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-08 04:36:27 +00:00
Timothy Wall ac63a6b125 fix field access
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@633 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-07 12:25:26 +00:00
Timothy Wall 72778c97df Allow explicit setting of structure field order
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@632 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-07 11:11:07 +00:00
Timothy Wall b4b86081f9 address issue #79, optionally omit jnilib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@631 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-05 17:16:02 +00:00
Timothy Wall e4a47a4ca5 update relnotes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@630 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-31 16:17:51 +00:00
Timothy Wall 79c60f6d4e Fix cursor tracking on alpha-masked windows
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@629 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-31 16:17:10 +00:00
Timothy Wall 4c4d55e0dc add backup in case pkg-config fails
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@628 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-31 16:03:24 +00:00
Timothy Wall 9504416beb Allow link against system libffi with 'ant -Ddynlink.native=true'
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@627 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-29 14:55:59 +00:00
Timothy Wall 99586d9b3f Provide src.zip for linux builds, old version now src-full.zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@626 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-29 13:50:45 +00:00
Timothy Wall 65b19cbbd3 Fix 32/64-bit library lookup where both arch versions exist
Try 'lib' prefix on w32

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@625 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-29 00:00:40 +00:00
Wayne Meissner 7b64f4443d More OpenBSD build changes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@624 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-26 05:49:53 +00:00
Wayne Meissner abb2e857be Revert md5 sum now that OpenBSD is fixed up
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@623 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-26 05:47:47 +00:00
Wayne Meissner df10745963 Use ggrep for OpenBSD. Not strictly correct, but grep -A1 on OpenBSD does not print out a '--' separator between matches. Strangely, -B1 does ...
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@622 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-26 05:47:30 +00:00
Wayne Meissner 3d729595d1 i386-OpenBSD port
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@621 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-26 05:47:12 +00:00
green 69205de17d Many test fixes (failures due to excessive compiler warnings). 2008-07-24 18:03:48 +00:00
green 260d513fea Version 3.0.6. sh/sh64 fixes. 2008-07-17 13:13:52 +00:00
Timothy Wall 96a38d1895 Fix division by zero on OSX/ppc calculating struct size
Fix overwriting of already-initialized NativeMapped field in struct when calculating struct size

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@620 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-13 18:53:49 +00:00
Timothy Wall b4c1390af8 Work around OSX transparent window dragging bug
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@619 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-08 14:32:52 +00:00
Timothy Wall e9604ac212 update to 3.0.4
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@617 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-05 18:55:32 +00:00
Timothy Wall ea3a4b34ea update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@616 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-05 12:17:08 +00:00
Timothy Wall 79a0d92161 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@615 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-05 12:16:07 +00:00
Timothy Wall b10c40260c enable NativeMapped array fields in Structure read/write
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@614 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-03 19:33:25 +00:00
xylo 9e056d2097 in StructureTest.testReadWriteStructure: test constancy of references after reading structure from memory
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@610 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-03 09:49:08 +00:00
Timothy Wall 8a250c5994 Look up proper library on Linux where arch=x86_64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@607 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-01 14:17:56 +00:00
xylo e311ac3269 in StructureTest.testReadWriteStructure: tabs replaced by spaces
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@604 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-28 14:03:24 +00:00
xylo 28078a2d0c in StructureTest.testReadWriteStructure: compare content of arrays after write/read structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@603 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-28 13:51:43 +00:00
xylo 7def8c1bbf in X11: remove tailing spaces in comments
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@602 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-28 12:11:26 +00:00
xylo 24ca11387e in Pointer: remove unnecessary spaces in comments
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@601 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-28 12:05:29 +00:00
xylo bccc9583c1 in X11: return Atom constants when calling Atom.fromNative(...)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@600 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-28 08:42:26 +00:00
xylo 9643747b17 in X11: added some native functions
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@599 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-27 17:51:45 +00:00
xylo c695848092 in X11: added remaining Atom constants (from 9 to 68)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@595 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-26 18:49:52 +00:00
Dan Rollo 5011613e4c Add GetDriveType() to Kernerl32 examples. Patch by Marc Strapetz.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@585 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-24 03:18:22 +00:00
Timothy Wall 6cc7f69a59 Make X11.XID NativeLong
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@583 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-23 22:48:37 +00:00
Timothy Wall db6678637b Ensure struct allocated when calling Union.setType
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@582 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-23 22:47:19 +00:00
Timothy Wall 93892e12a2 Fix incorrect solaris/x86 native library
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@581 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-23 19:01:07 +00:00
Timothy Wall c196aab89d remove trailing comment close
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@580 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-22 12:04:07 +00:00
Timothy Wall 54a7718b88 clean up X headers
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@579 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-22 12:03:20 +00:00
Timothy Wall cec6e6175a Use the actual parameter type in Function invocations if no paramter type information is available (whether method is missing or untyped varargs).
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@578 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-22 11:30:57 +00:00
Timothy Wall bc5036bd34 auto-write Structure.ByReference fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@577 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-21 21:00:37 +00:00
Timothy Wall 021826eb1b update release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@576 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-21 20:42:23 +00:00
Timothy Wall facd071967 Handle arrays of NativeMapped in Structure fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@575 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-21 20:40:33 +00:00
Timothy Wall 486e81ad77 upgrade to 2.x clover
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@574 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-29 14:42:11 +00:00
Timothy Wall 872cd3d7c0 Apply xylo's library load patch, fix versioned name checking tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@573 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-27 13:59:06 +00:00
Timothy Wall ca9851b311 Fix linux library load bug
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@572 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-23 14:22:08 +00:00
Timothy Wall 2fa0940d45 update jna.jar with updated linux builds
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@569 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 20:48:04 +00:00
Timothy Wall 3485338386 update linux-amd64 to 3.0.4 (native)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@568 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 20:33:43 +00:00
Timothy Wall 786a821f3f update linux-i386 jar to 3.0.4 (native)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@567 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 20:30:19 +00:00
Timothy Wall da1c9c5ea5 remove erroneous comment
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@565 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 17:04:23 +00:00
Timothy Wall 93d8cce7ac post 3.0.3 build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@564 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 17:03:51 +00:00
Timothy Wall 5086ba2a3b include project files in source zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@563 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 16:32:12 +00:00
Timothy Wall 4cf8611dcd add note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@562 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-20 15:42:41 +00:00
Timothy Wall 101e9d705a Add more win32 type examples
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@561 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-20 15:10:57 +00:00
Timothy Wall 7d8bfa1b62 Fix NPE in NativeMappedConverter
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@560 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-20 15:09:48 +00:00
Timothy Wall 5dcf9e2f41 update perf info
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@559 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-14 14:49:13 +00:00
Timothy Wall cdf18b6c4d ensure memory is initialized before Structure.read() - avoid NPE
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@558 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-09 15:21:55 +00:00
Timothy Wall 609ce3b6e0 ensure memory is initialized before Structure.read() - avoid NPE
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@557 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-09 15:21:05 +00:00
Timothy Wall 3ba8be2e21 improve package/version information in code and manifest
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@556 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-05 23:58:48 +00:00
Timothy Wall 6b13a97ce4 fix jnlp links
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@555 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-02 20:49:20 +00:00
Dan Rollo 130e40957e Fix issue# 68 - File monitor thread terminates on any removeWatch call.
kludge: fix intermittent failures on slow W2K box.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@554 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-02 03:56:38 +00:00
Dan Rollo a7b28317d7 Fix issue# 68 - File monitor thread terminates on any removeWatch call. Change W32FileMonitor.dispose() to unwatch any remaining files in map, allows watcher thread to exit.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@553 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-02 03:29:13 +00:00
Dan Rollo 29fcd0fdcf Fix issue# 68 - File monitor thread terminates on any removeWatch call. (only formatting and debug info changes)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@552 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-02 02:04:58 +00:00
Dan Rollo 9d5f63e543 Fix issue# 68 - File monitor thread terminates on any removeWatch call.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@551 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-02 01:20:59 +00:00
Timothy Wall 208c28ead2 add entry for native long mapping
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@550 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-01 15:16:55 +00:00
Timothy Wall 447d5ee94b Allow 'final' modifier in Structure fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@549 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-25 13:43:06 +00:00
Dan Rollo bb443add17 Fix for Jira issue: 67 - FileMonitor incorrectly handles FILE_DELETED notification mask. Added a unit test and committed fix.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@548 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-24 03:33:39 +00:00
Timothy Wall cb954773ed Fix bug in ByValue structs using NativeMapped
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@547 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-15 16:51:35 +00:00
Timothy Wall 89749c7eb1 update native builds
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@546 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-11 20:22:06 +00:00
Timothy Wall 30146f8744 fix callback allocation on freebsd
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@545 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-11 19:48:27 +00:00
Timothy Wall a623f374b1 enable mmap closures on solaris
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@544 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-11 18:33:17 +00:00
Dan Rollo b41584feb3 fix test failures on amd64 with 64-bit jvm. Classloader/path was using "build" instead of "build-d64".
NOTE: I considered changing and re-using the ["vmopt.arch" value="-d64" else="-Dignore"] already defined in build.xml for this, but I wasn't sure what the "-Dignore" case was intended for.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@543 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-11 07:34:41 +00:00
Timothy Wall 77d5bbb767 Fix typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@542 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-11 01:55:21 +00:00
Timothy Wall 171d428d3a Improve StdCallFunctionMapper
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@541 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-10 14:35:35 +00:00
Timothy Wall 61254c6cc4 Fix callbacks when DEP is enabled
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@540 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-10 02:39:51 +00:00
Timothy Wall 44b3a8952e fix typos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@539 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-08 17:54:21 +00:00
Timothy Wall 0fc8c5e7e9 add videolan project
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@538 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-08 12:45:16 +00:00
Timothy Wall 6d969eb92f improve X11 window masking performance
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@537 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-08 09:29:02 +00:00
green 3704031875 Rev 3.0.5. 2008-04-03 18:57:57 +00:00
green 8406f5f48f 3.0.5 2008-04-03 18:57:34 +00:00
Timothy Wall 26ea0f81ca only set vm arch option for 64-bit vms
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@536 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-03 15:19:43 +00:00
Timothy Wall dc45e38f11 fix relocation errors on sunos-amd64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@535 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-03 14:40:42 +00:00
Timothy Wall 9d5db40d3f enable ibm j9 build/run
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@534 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-03 00:57:47 +00:00
Timothy Wall 9e25d52679 improve w32 window masking
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@533 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-01 16:09:56 +00:00
Timothy Wall 1f98d4f6ff improve performance of window masking
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@532 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-01 00:59:12 +00:00
Timothy Wall b73883ce1d Refine test for IBM's J9 VM
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@531 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-31 14:26:32 +00:00
Timothy Wall 7af42da5d2 partial fix for aix/ppc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@530 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-31 13:18:29 +00:00
Timothy Wall cf75057b67 fix bug where struct is incorrectly passed by value instead of by reference
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@529 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-13 17:27:15 +00:00
Timothy Wall e5b1841030 Check entire linux version, not just last digit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@528 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-11 04:48:27 +00:00
Dan Rollo 57325a22a5 refactor common code
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@527 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-09 05:31:48 +00:00
Dan Rollo c640166cf8 remove unused import, make unchanging member vars final.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@526 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-09 05:19:14 +00:00
Dan Rollo 4b4c362c03 remove unused imports
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@525 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-09 05:15:47 +00:00
Dan Rollo c71bfb1602 fix testMultipleWatches() by clearing prior events.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@524 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-09 00:43:35 +00:00
Dan Rollo 022e6349c1 make Kernel32/Test work on Win2k.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@523 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-09 00:42:00 +00:00
Timothy Wall 917671ac9a use frames link for javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@522 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-07 15:29:24 +00:00
Timothy Wall a108975d78 link to javadoc sans dev.java.net navigation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@521 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-07 15:28:22 +00:00
green 23a9e73212 2008-03-04 Anthony Green <green@redhat.com>
Blake Chaffin
            hos@tamanegi.org

        * testsuite/libffi.call/cls_align_longdouble_split2.c
          testsuite/libffi.call/cls_align_longdouble_split.c
          testsuite/libffi.call/cls_dbls_struct.c
          testsuite/libffi.call/cls_double_va.c
          testsuite/libffi.call/cls_longdouble.c
          testsuite/libffi.call/cls_longdouble_va.c
          testsuite/libffi.call/cls_pointer.c
          testsuite/libffi.call/cls_pointer_stack.c
          testsuite/libffi.call/err_bad_abi.c
          testsuite/libffi.call/err_bad_typedef.c
          testsuite/libffi.call/huge_struct.c
          testsuite/libffi.call/stret_large2.c
          testsuite/libffi.call/stret_large.c
          testsuite/libffi.call/stret_medium2.c
          testsuite/libffi.call/stret_medium.c: New tests from Apple.
2008-03-05 00:07:02 +00:00
Timothy Wall 62d31c5902 Fix NPE
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@520 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-04 16:28:36 +00:00
Timothy Wall 5d28314ee3 Add Emmanuel's Lego Mindstorm NXT driver
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@519 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-01 12:41:26 +00:00
Timothy Wall 1b22109f95 update platform list, support notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@518 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-01 12:35:53 +00:00
Timothy Wall e5c05bfd66 fix constant usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@517 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-29 16:07:38 +00:00
Timothy Wall 62e97858d7 tweak main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@516 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-29 15:54:56 +00:00
Timothy Wall b9da9b977e tweak main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@515 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-29 15:54:09 +00:00
Timothy Wall f121b6c039 tweak
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@513 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 19:51:55 +00:00
Timothy Wall c48b13bc0a update examples jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@512 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 19:36:20 +00:00
Timothy Wall 26abb9beb9 update examples jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@511 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 19:34:44 +00:00
Timothy Wall 02cc7d53b7 update demos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@510 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 19:28:35 +00:00
Timothy Wall 67136b5986 update linux-amd64 native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@509 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 13:50:40 +00:00
Timothy Wall 58d5175fde fix w32 api type mapper bug exposed by last round of changes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@508 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 13:43:23 +00:00
green 429e37d3ad clicky 2008-02-28 04:50:19 +00:00
green 51e79c4283 getclicky 2008-02-28 04:47:35 +00:00
Timothy Wall c511c4063e use 'JNI_FALSE' rather than 'false'
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@507 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:43:23 +00:00
Timothy Wall 6429611b3c include sunos-amd64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@506 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:32:45 +00:00
Timothy Wall 3cea53ddca bump version on jna.jar to 3.0.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@505 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:29:50 +00:00
Timothy Wall d661e58fc3 bump version, include new architectures
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@504 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:28:13 +00:00
Timothy Wall e140b6e4e2 Disable inapplicable test on OSX
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@503 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:19:47 +00:00
Timothy Wall e1025d9337 Use UTF8 encoding for OSX library names
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@502 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:15:06 +00:00
Timothy Wall f1acc483c3 Disable manual WindowUtils test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@501 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 03:49:23 +00:00
Timothy Wall 0e25e979a2 Fix window alpha compositing on X11
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@500 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 03:21:31 +00:00
Timothy Wall 0c129ff02e Fix NPE when using NativeMapped within Structure (https://jna.dev.java.net/issues/show_bug.cgi?id=54)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@499 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 03:15:06 +00:00
green affcab04e2 2008-02-26 Jakub Jelinek <jakub@redhat.com>
Anthony Green  <green@redhat.com>

        * src/alpha/osf.S: Add .note.GNU-stack on Linux.
        * src/s390/sysv.S: Likewise.
        * src/powerpc/linux64.S: Likewise.
        * src/powerpc/linux64_closure.S: Likewise.
        * src/powerpc/ppc_closure.S: Likewise.
        * src/powerpc/sysv.S: Likewise.
        * src/x86/unix64.S: Likewise.
        * src/x86/sysv.S: Likewise.
        * src/sparc/v8.S: Likewise.
        * src/sparc/v9.S: Likewise.
        * src/m68k/sysv.S: Likewise.
        * src/ia64/unix.S: Likewise.
        * src/arm/sysv.S: Likewise.
2008-02-26 19:01:53 +00:00
green 59689d5522 2008-02-26 Anthony Green <green@redhat.com>
Thomas Heller  <theller@ctypes.org>

        * src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C
        comment.
2008-02-26 17:40:51 +00:00
green b13c84cf46 2008-02-26 Anthony Green <green@redhat.org>
Thomas Heller <theller@ctypes.org>

        * include/ffi.h.in: Change void (*)() to void (*)(void).
2008-02-26 17:38:15 +00:00
green 265289f679 2008-02-26 Anthony Green <green@spindazzle.org>
* src/alpha/ffi.c: Change void (*)() to void (*)(void).
        src/alpha/osf.S, src/arm/ffi.c, src/frv/ffi.c, src/ia64/ffi.c,
        src/ia64/unix.S, src/java_raw_api.c, src/m32r/ffi.c,
        src/mips/ffi.c, src/pa/ffi.c, src/pa/hpux32.S, src/pa/linux.S,
        src/powerpc/ffi.c, src/powerpc/ffi_darwin.c, src/raw_api.c,
        src/s390/ffi.c, src/sh/ffi.c, src/sh64/ffi.c, src/sparc/ffi.c,
        src/x86/ffi.c, src/x86/unix64.S, src/x86/darwin64.S,>         src/x86/ffi64.c: Ditto.
2008-02-26 17:34:36 +00:00
Timothy Wall 05234082a9 add rococoa
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@498 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-26 14:35:12 +00:00
Timothy Wall bdc44962a1 update javadoc for 3.0.1
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@497 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-26 14:19:37 +00:00
Timothy Wall e96a59965e add FAQ topics
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@496 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-26 14:06:05 +00:00
Timothy Wall 507f3fc74b add sunos-amd64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@495 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-25 14:59:24 +00:00
Timothy Wall 22d997fcd9 add freebsd-amd64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@494 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-25 14:21:59 +00:00
green fb5036cd6d fix date 2008-02-24 17:25:25 +00:00
green 40bec108e7 New release 2008-02-24 17:25:02 +00:00
green b922048fa8 2008-02-24 Anthony Green <green@spindazzle.org>
* configure.ac: Accept openbsd*, not just openbsd.
        Bump version to 3.0.4.
        * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
        * libtool-version: Increment revision.
        * README: Update for new release.
2008-02-24 17:24:00 +00:00
green affca4b92d sync readme with web page. 2008-02-22 21:53:29 +00:00
green 3e53d8752e New release 2008-02-22 21:52:38 +00:00
green 4d92f6c8e7 2008-02-22 Anthony Green <green@redhat.com>
* configure.ac: Bump version to 3.0.3.
        * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
        * libtool-version: Increment revision.
        * README: Update for new release.  Clean up test docs.
2008-02-22 21:49:46 +00:00
green 0e185fa11a Update configure script. 2008-02-22 21:43:18 +00:00
green f73986bd21 2008-02-22 Bjoern Koenig <bkoenig@alpha-tierchen.de>
Andreas Tobler  <a.tobler@schweiz.org>

        * configure.ac: Add amd64-*-freebsd* target.
        * configure: Regenerate.
2008-02-22 21:40:53 +00:00
green 0208f68fe5 2008-02-22 Thomas Heller <theller@ctypes.org>
* configure.ac: Add x86 OpenBSD support.
        * configure: Rebuilt.
2008-02-22 21:15:44 +00:00
green 01adb0e638 Fix README. 2008-02-21 16:17:26 +00:00
green 1edd456322 3.0.2 2008-02-21 13:39:01 +00:00
green c9b5428008 add missing file 2008-02-21 13:36:43 +00:00
green d5fa5633d5 2008-02-21 Anthony Green <green@redhat.com>
* configure.ac: Bump version to 3.0.2.
        * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
        * libtool-version: Increment revision.
        * README: Update for new release.

2008-02-21  Björn König <bkoenig@alpha-tierchen.de>

        * src/x86/freebsd.S: New file.
        * configure.ac: Add x86 FreeBSD support.
        * Makefile.am: Ditto.
2008-02-21 13:36:19 +00:00
green ac35bfc6fc Updated 2008-02-16 01:03:56 +00:00
green f7942975fe 2008-02-15 Anthony Green <green@redhat.com>
* configure.ac: Bump version to 3.0.1.
        * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
        * libtool-version: Increment revision.
        * README: Update for new release.

2008-02-15  David Daney  <ddaney@avtrex.com>

        * src/mips/ffi.c: Remove extra '>' from include directive.
        (ffi_prep_closure_loc): Use clear_location instead of tramp.
2008-02-16 01:02:00 +00:00
green 59aa6bb1bf Add more platforms. 2008-02-15 20:52:26 +00:00
green 45a45ab990 3.0 notes 2008-02-15 19:16:36 +00:00
green 4db74cbea8 Update 2008-02-15 19:10:26 +00:00
green c3e1101ffa 2008-02-15 Anthony Green <green@redhat.com>
* configure.ac: Bump version to 3.0.0,
        * configure, doc/stamp-vti, doc/version.texi: Rebuilt.

2008-02-15  David Daney  <ddaney@avtrex.com>

        * src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
        Define (conditionally), and use it to include cachectl.h.
        (ffi_prep_closure_loc): Fix cache flushing.
        * src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.
2008-02-15 18:43:40 +00:00
green 7e0cc12e92 New release 2008-02-15 15:51:03 +00:00
green 2d7dc885ec * man/ffi_call.3, man/ffi_prep_cif.3, man/ffi.3:
Update dates and remove all references to ffi_prep_closure.
        * configure.ac: Bump version to 2.99.9.
        * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
2008-02-15 15:30:26 +00:00
green a0525f03ee New release. 2008-02-15 15:14:30 +00:00
green 2b30dfb314 * man/ffi_prep_closure.3: Delete.
* man/Makefile.am (EXTRA_DIST): Remove ffi_prep_closure.3.
        (man_MANS): Ditto.
        * man/Makefile.in: Rebuilt.
        * configure.ac: Bump version to 2.99.8.
        * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
2008-02-15 15:12:43 +00:00
green bf41e64840 Update. 2008-02-15 01:56:50 +00:00
green 4d39ddee67 * configure.ac: Bump version to 2.99.7.
* configure, doc/stamp-vti, doc/version.texi: Rebuilt.
        * include/ffi.h.in LICENSE src/debug.c src/closures.c
          src/ffitest.c src/s390/sysv.S src/s390/ffitarget.h
          src/types.c src/m68k/ffitarget.h src/raw_api.c src/frv/ffi.c
          src/frv/ffitarget.h src/sh/ffi.c src/sh/sysv.S
          src/sh/ffitarget.h src/powerpc/ffitarget.h src/pa/ffi.c
          src/pa/ffitarget.h src/pa/linux.S src/java_raw_api.c
          src/cris/ffitarget.h src/x86/ffi.c src/x86/sysv.S
          src/x86/unix64.S src/x86/win32.S src/x86/ffitarget.h
          src/x86/ffi64.c src/x86/darwin.S src/ia64/ffi.c
          src/ia64/ffitarget.h src/ia64/ia64_flags.h src/ia64/unix.S
          src/sparc/ffi.c src/sparc/v9.S src/sparc/ffitarget.h
          src/sparc/v8.S src/alpha/ffi.c src/alpha/ffitarget.h
          src/alpha/osf.S src/sh64/ffi.c src/sh64/sysv.S
          src/sh64/ffitarget.h src/mips/ffi.c src/mips/ffitarget.h
          src/mips/n32.S src/mips/o32.S src/arm/ffi.c src/arm/sysv.S
          src/arm/ffitarget.h src/prep_cif.c: Update license text.
2008-02-15 01:24:06 +00:00
green d58b032b41 New release 2008-02-15 00:59:25 +00:00
green 91e5478df6 Update supported platforms. Bump version. 2008-02-15 00:50:30 +00:00
green bd0768f877 * configure.ac: Bump version to 2.99.5.
* configure: Rebuilt.
        * Makefile.am (EXTRA_DIST): Add darwin64.S
        * Makefile.in: Rebuilt.
        * testsuite/lib/libffi-dg.exp: Remove libstdc++ bits from GCC tree.
        * LICENSE: Update WARRANTY.
2008-02-15 00:45:33 +00:00
green 49d345f767 update license reference 2008-02-14 23:43:27 +00:00
green 12ac48fc79 Update WARRANTY 2008-02-14 23:42:08 +00:00
green 6b91c41da8 fix tarball reference 2008-02-14 23:38:27 +00:00
green 2b59579e35 First update in 5 years! 2008-02-14 23:35:58 +00:00
green 6cbdf3f3a3 Fix .pc file bug and bump version 2008-02-14 22:44:06 +00:00
green 1d1dc81104 Add man files and info file. Update README. Tag as 2.99.3. 2008-02-14 22:03:37 +00:00
tromey f045a2367f Move entry from ChangeLog to ChangeLog.libffi 2008-02-14 20:46:57 +00:00
tromey 6257f07d1a * aclocal.m4, Makefile.in, configure, fficonfig.h.in: Rebuilt.
* mdate-sh, texinfo.tex: New files.
	* Makefile.am (info_TEXINFOS): New variable.
	* doc/libffi.texi: New file.
	* doc/version.texi: Likewise.
2008-02-14 20:33:17 +00:00
green 4232af563c * Makefile.am (AM_CFLAGS): Don't compile with -D.
(lib_LTLIBRARIES): Define.
        (toolexeclib_LIBRARIES): Undefine.
        * Makefile.in: Rebuilt.
        * configure.ac: Reset version to 2.99.1.
        * configure.in: Rebuilt.
2008-02-14 16:19:21 +00:00
green 961543615c Fix typo. 2008-02-14 15:57:40 +00:00
green aeb0abab87 * libffi.pc.in: Usse @PACKAGE_NAME@ and @PACKAGE_VERSION@.
* configure.ac: Reset version to 2.99.1.
        * configure.in: Rebuilt.
        * Makefile.am (EXTRA_DIST): Add ChangeLog.libffi.
        * Makefile.in: Rebuilt.
        * LICENSE: Update copyright notice.
2008-02-14 15:54:27 +00:00
green 77fe243556 Fix make dist again 2008-02-14 15:37:00 +00:00
green d4970cf452 Fix make dist 2008-02-14 15:18:56 +00:00
green f0b1462f2d Use pkgconfig. Increment libtool CURRENT version. 2008-02-14 15:01:41 +00:00
Timothy Wall 89a98ca51b remove obsolete comment
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@493 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-14 14:58:00 +00:00
Timothy Wall 9834abe3ab Fix X11 mappings for 64-bit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@492 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-14 03:56:59 +00:00
Timothy Wall 54ffc2c138 enable x86_64 builds on OS X
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@491 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-11 21:06:13 +00:00
Timothy Wall 4785c4f11e finalize is more thorough than unload
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@490 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-11 21:04:47 +00:00
Timothy Wall 9d5b0deb61 Add explicit test for matching linux versioned libs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@489 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-11 21:04:00 +00:00
Timothy Wall 9c0b540ddc Add explicit test for matching linux versioned libs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@488 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-11 21:01:14 +00:00
Timothy Wall c124a9f2b8 Fix OSX window transparency for 1.5+/Leopard
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@487 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-08 18:18:23 +00:00
Timothy Wall 8b0e08f9df Attempt to force the VM to unload the jnidispatch native lib before deleting it (w32)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@486 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-06 13:53:02 +00:00
Timothy Wall 9ee115d1a0 allocate minimal space for invocation args, instead of MAX_NARGS
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@485 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-06 13:46:22 +00:00
Timothy Wall a7ebf431a8 fix release notes link
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@484 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 14:21:40 +00:00
Timothy Wall d85330d54a remove svn:executable from html files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@483 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 14:21:07 +00:00
Timothy Wall f8f93c7351 Set mime type
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@482 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 14:18:16 +00:00
Timothy Wall ee1fd4944f add folder icon
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@481 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 14:15:59 +00:00
Timothy Wall 5117fa06b8 reformat release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@480 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 14:15:25 +00:00
Timothy Wall 2ac1552bf7 add athena backup
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@479 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 13:55:10 +00:00
green 27e52f33ba Fix header installs when using DESTDIR. 2008-02-03 13:59:48 +00:00
twall fadab28eb6 update changelog 2008-02-03 12:32:22 +00:00
twall b5e44c8dfa offset from code base address, not data base address 2008-02-03 01:12:32 +00:00
green f359848d1a Fix header installs. 2008-02-01 21:29:43 +00:00
green c30df49e15 Revert my broken changes to twall's patch. 2008-02-01 21:13:55 +00:00
Timothy Wall 94c2647d25 update sunos jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@477 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-01 00:24:36 +00:00
Timothy Wall 6b2f067435 Ensure manifest is included in dist/jna.jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@476 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-01 00:23:44 +00:00
Timothy Wall 3e2471d0a0 Ensure tests run under appropriate VM for sparcv9
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@475 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-31 21:57:35 +00:00
Timothy Wall f0b1d33398 enable memory access protection on solaris
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@474 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-31 14:43:47 +00:00
green 675561bb9a Fix make dist . 2008-01-31 13:44:25 +00:00
green abc0bbf381 Add Tim Wall's x86 windows patch. 2008-01-31 11:58:57 +00:00
Timothy Wall bae955f7c5 update jars to 3.0.1
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@473 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-31 02:20:34 +00:00
Timothy Wall b747e71583 clean up symbols for freebsd
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@472 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-31 00:29:59 +00:00
green e332366d15 Add HJ's -fomit-frame-pointer struct return fix 2008-01-30 13:21:02 +00:00
green d420424039 Clean up for new automake. 2008-01-30 12:42:34 +00:00
Timothy Wall 48160da4b7 update examples jar (WindowUtils)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@471 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-30 12:41:13 +00:00
green f4932dd020 Fixes to run testsuite 2008-01-30 12:40:25 +00:00
green 085520ddc8 New files from gcc tree. 2008-01-29 15:16:43 +00:00
green 77175b3f72 Latest gcc svn sources 2008-01-29 15:15:20 +00:00
green 2544e45a0b Install ffitarget.h in $prefix/include. 2008-01-29 14:28:13 +00:00
green 6002211b1c Add new files. 2008-01-29 12:30:10 +00:00
green ccabd2b16b Merge from gcc 2008-01-29 12:28:15 +00:00
Timothy Wall d17df6a9db Allow window masks to be set on heavyweight components (at least on w32 and x11)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@470 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-28 16:10:38 +00:00
Timothy Wall df7a9ec977 make graphics test run only if not headless
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@469 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-28 15:08:55 +00:00
Timothy Wall f2157420f2 use ffi_prep_closure_loc, not ffi_prep_closure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@468 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-28 14:55:31 +00:00
Timothy Wall ae9c56416f Use closure alloc from libffi
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@467 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-28 14:23:23 +00:00
Timothy Wall 1dec6a541a Fix linux library name mapping (sans regexp)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@466 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 18:04:18 +00:00
Timothy Wall c75157ffd8 Fix javadoc warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@465 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 17:45:29 +00:00
Timothy Wall fa77d03fea Provide explicit dispose on NativeLibrary
Cache NativeMappedConverter instances for improved performance
Preliminary support for wince (improve backwards compatibility for older VMs)
Provide 'synch after call' interface for arguments that need to perform some sort of synchronization after a native call

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@464 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 17:33:12 +00:00
Timothy Wall 618f4c533c Fix non-w32 compilation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@463 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 16:26:59 +00:00
Timothy Wall 9b77631dd5 update project files (netbeans/eclipse)
use setjmp/longjmp to recover from w32 faults instead of simply setting SP
embed version resource information in w32 dll
don't update last error if ffi_call faults

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@462 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 16:19:02 +00:00
Timothy Wall 7aa22df1e2 Use XImage instead of XDrawRectangle point by point
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@461 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 15:45:39 +00:00
Timothy Wall ee0ff79820 Fix bug in Pointer.setChar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@460 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-23 23:03:30 +00:00
Timothy Wall ca772e8a9c add missing import
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@459 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-23 17:01:01 +00:00
Timothy Wall 8af05c14be Avoid creating too many windows when setting window mask
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@458 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-23 16:37:24 +00:00
Timothy Wall 20f230e910 fix md5 calculation on sunos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@457 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-22 20:54:54 +00:00
Timothy Wall 8af51875b6 Improve test output
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@456 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-22 20:42:23 +00:00
Timothy Wall a4ead757f6 Fix bug in STructure.toArray w/nested struct arrays
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@455 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-22 13:56:31 +00:00
Timothy Wall 0cc6bc9e2e Improve transparent window drawing performance on w32
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@454 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-22 13:35:14 +00:00
Timothy Wall 00a551d2b1 fix html typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@453 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-19 22:28:02 +00:00
Timothy Wall b6f1652aab update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@452 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-15 16:55:33 +00:00
Timothy Wall b304555389 Ensure initialized nested structure arrays use the right memory
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@451 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 19:43:41 +00:00
Timothy Wall 456af457bb Ensure initialized nested structure arrays use the right memory
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@450 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 19:42:08 +00:00
Timothy Wall e9cb67844d off_t size varies by platform
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@449 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 18:50:29 +00:00
Timothy Wall ff12099078 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@446 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 18:25:46 +00:00
Timothy Wall 4068c6da1a Fix bug in nested struct array read/write
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@445 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 17:56:16 +00:00
Timothy Wall 2f839a41c0 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@444 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 17:27:22 +00:00
Timothy Wall d9c13aefe3 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@443 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 17:26:28 +00:00
Timothy Wall 7bfa1c27bf improve javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@442 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 17:25:03 +00:00
Timothy Wall f6986352ee improve javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@441 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 17:20:33 +00:00
Timothy Wall 2eb51bbb13 Improve error messages when illegal argument/return types are used
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@440 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 16:59:37 +00:00
Timothy Wall 77ef1e75c8 Fix bug in callback proxy.equals (wolfgang.roekelein)
Clean up some javadoc

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@439 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-04 13:48:42 +00:00
Timothy Wall ae11a9d77c Fix JNLP class loader method lookup
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@438 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-04 05:01:30 +00:00
Timothy Wall 30648be2ed fix FFIType.size_t ctor signatore
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@437 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-03 19:00:57 +00:00
Timothy Wall e5958a2a15 Fix bug in stdcall function mapping when using struct by value
Defer size_t/off_t definition, for now

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@436 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-03 18:37:38 +00:00
Timothy Wall 8d3b41ea4d Consolidate Structure.ByReference reads
Cache native library options as well as alignments/type mappers
Ensure library options are passed to callbacks
Add protection around remaining Pointer read/write calls
Consolidate wide character reads/writes
Avoid stack overflow reading self-referential structures or loops
More prettification of Structure.toString
Add size_t/off_t standard types

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@435 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-27 15:53:49 +00:00
Timothy Wall 2d7f82af75 Fix NPE when sizing struct with a struct array field
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@434 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-21 15:25:05 +00:00
Timothy Wall 9c93a94834 Update linux-amd64 native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@433 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-21 02:25:15 +00:00
Timothy Wall 13a9861d18 Avoid NPE in toString
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@432 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-20 21:16:27 +00:00
Timothy Wall f7d1a91aad Allow array of struct by reference as argument
Pretty-print structure info in toString

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@431 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-20 21:08:14 +00:00
Timothy Wall 121b8e0a64 Fix VM crash running test under linux-amd64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@430 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-20 14:44:25 +00:00
Timothy Wall 36ebf4a034 Properly handle default boolean mapping (int) in Structure read/write
Provide Pointer.share(offset) (allow omission of 'size')

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@429 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-19 17:02:45 +00:00
Timothy Wall 0a752616b7 Fix arg/result handling for callback values in callbacks
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@428 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-18 15:51:53 +00:00
Timothy Wall edd21a959b update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@427 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-18 04:02:41 +00:00
Timothy Wall dfe9779401 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@426 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-18 04:02:11 +00:00
Timothy Wall d64bc68562 Move w32 JAWT load into native code
Fix Structure.ByValue for callback arg/return
Perform better type checking on callback arg/return types
Propagate library/symbol lookup error messages
Enable loading of libraries with non-ascii names
Tighten type checking in native code

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@425 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-18 03:30:35 +00:00
Timothy Wall f29a57ceb2 update with w32 JAWT workaround
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@424 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-16 12:01:42 +00:00
Timothy Wall 529c8e36f2 reinstate w32 JAWT workaround; tests work without it, but demo code doesn't
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@423 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-16 12:00:57 +00:00
Timothy Wall 108abcdec4 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@422 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-16 11:48:10 +00:00
Timothy Wall 1ae7d8373f Consolidate structure ffi type info initialization and avoid premature GC
Enable union by-value by using largest field's type info
Explicitly throw IllegalArgument on bad type info
Throw IllegalState on missing type info
Explicitly write version/md5 info into Makefile from ant (to avoid platform-specific variances in sed)
Make Structure.ByValue/ByReference public to allow client code comparisons
Consolidate Structure field get/set operations
Avoid extra Pointer peer lookup from native code (wmeissner)

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@421 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-16 11:04:12 +00:00
Timothy Wall 8eb4860ec6 Add explicit test for JNA load under headless environment
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@420 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 21:46:18 +00:00
Timothy Wall 7ae188c42b update w32 jar and universal jar (defer toolkit load)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@419 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 21:29:48 +00:00
Timothy Wall 125a65ee8a defer AWT toolkit initialization until actual JAWT use
Make w32 dynamically load JAWT to avoid forcing toolkit init on JNA load

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@418 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 21:26:37 +00:00
Timothy Wall 98c3353a07 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@417 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 16:26:16 +00:00
Timothy Wall 683ba59fae update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@416 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 16:17:58 +00:00
Timothy Wall 38abd739d3 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@415 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 16:15:47 +00:00
Timothy Wall df58c84b5a Embed version and checksum into native library
Print version information for 'java -jar jna.jar'

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@414 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 15:59:28 +00:00
Timothy Wall 513bb215db Close JAWT library if it's been opened
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@413 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 15:35:57 +00:00
Timothy Wall 77be329ed0 Avoid error loading JAWT when running headless
Use primary colors in window shape test (Dan)

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@412 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 15:30:27 +00:00
Timothy Wall 1f223fbe13 Auto-include web start lib path if jnidispatch is a <nativelib>
Invalidate platform jars when native API changes

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@411 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-10 15:28:26 +00:00
Timothy Wall c6a21ab661 update jar, doc, src
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@410 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 17:42:55 +00:00
Timothy Wall 6d59f0bd3f provide memory alignment to Memory if requested
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@409 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 17:32:57 +00:00
Timothy Wall 74972e267a fix typos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@408 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 16:36:35 +00:00
Timothy Wall 6c2134ba0e clean up typos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@407 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 16:05:25 +00:00
Timothy Wall 7bf53b0588 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@406 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 15:46:41 +00:00
Timothy Wall eaff635df5 clean up JavaDoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@405 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 15:41:59 +00:00
Timothy Wall 88ad275b44 Provide for tweaking of invocation handling between interface and native
Add test for annotation preservation in proxy methods
Add explicit global variable lookup
Add utility method to determine Web Start native library location

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@404 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 04:33:00 +00:00
Timothy Wall fe6143ca49 Fix Memory ctor signature
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@403 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-08 14:58:07 +00:00
Timothy Wall 724432aa02 fix broken anchor
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@402 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-04 15:23:43 +00:00
Wayne Meissner 9686a4b1bd Add a hack for OpenJDK (Soylatte) on macosx - System.mapLibraryName() returns a .dylib extension now, not .jnilib.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@401 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-03 23:45:10 +00:00
Timothy Wall 7f8fab8ec0 update dist files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@400 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-03 07:15:14 +00:00
Timothy Wall 5a985a143b update
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@399 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-02 15:39:55 +00:00
Timothy Wall f9154f8c2e update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@398 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-01 06:44:10 +00:00
Timothy Wall 287879a7f5 add struct by value notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@397 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-01 06:18:30 +00:00
Timothy Wall 3c82302545 make color-checking on OSX more robust
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@396 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-01 06:09:02 +00:00
Timothy Wall b331783c01 implement struct by value
add missing Pointer char function

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@395 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-01 05:45:36 +00:00
Timothy Wall 1882210db4 Remove obsolete target
Canonicalize x86 ARCH settings
FreeBSD no longer needs pthread linkage

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@394 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-29 13:50:28 +00:00
Timothy Wall 12bd185a9b Fix clover target
Omit embedded timestamp from javadoc
Set ARCH flag for amd64 build (Dan/bha)

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@393 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-29 13:49:13 +00:00
Timothy Wall 3dbaa7984f Use simpler workaround for loading AWT/JAWT on X11-based platforms
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@392 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-28 19:48:14 +00:00
Timothy Wall 40f00b1dcb Fix bug checking IntegerType limits
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@391 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-28 17:27:42 +00:00
Timothy Wall 98bb38cb03 clean up kernel32 handling
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@390 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-28 02:38:48 +00:00
Timothy Wall e1b4c8d616 update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@389 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-27 17:05:54 +00:00
Timothy Wall 5d7c015348 fix non-universal builds on darwin
keep warning flags for mingw32 builds

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@388 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-27 14:25:23 +00:00
Timothy Wall a90e7c82b3 synch libffi with http://gcc.gnu.org/svn/gcc/trunk/libffi@130462 (adds mingw32ce support)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@387 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-27 07:17:11 +00:00
Timothy Wall 6c0c9e7d7c ensure JNA library can be unloaded
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@384 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-26 20:26:51 +00:00
Timothy Wall 461b35f6ef update platform jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@383 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 06:51:35 +00:00
Timothy Wall 81ca040918 fix indexOf return value
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@382 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 06:25:36 +00:00
Timothy Wall 5dc6bfb195 use long offsets and sizes for pointer arithmetic
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@381 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 04:51:16 +00:00
Timothy Wall b0d3657e56 clean up new libffi files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@380 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 04:47:49 +00:00
Timothy Wall 822913c85f remove obsolete native files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@379 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 04:45:20 +00:00
Timothy Wall ce0ac250e1 update ignored files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@378 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 04:43:58 +00:00
Timothy Wall 22e98986e5 set mime type
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@377 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-13 18:16:07 +00:00
Timothy Wall 3f7fc39362 Add expect test for stdcall closures
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@376 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 23:08:48 +00:00
Timothy Wall 024c845d06 update examples jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@375 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 19:35:19 +00:00
Timothy Wall 4bb1e29cf3 Add w32 keyboard hook to contrib
Add more w32 API (user32)

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@374 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 19:34:06 +00:00
Timothy Wall fa7bdc4fcd Add explicit check for correct stdcall stack pointer
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@373 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 19:00:18 +00:00
Timothy Wall ab0708340c update w32 native bits
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@372 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 18:41:22 +00:00
Timothy Wall 34723a2e17 update change log
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@371 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 18:40:00 +00:00
Timothy Wall d4c4d2bb13 Fix stdcall callbacks
catch all exceptions when invoking callback

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@370 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 18:38:24 +00:00
Timothy Wall 80090df8e4 Fix NPE on non-windows platforms
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@369 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-07 01:15:30 +00:00
Timothy Wall 05dc68db7b fix obsolete import
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@368 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-06 04:49:12 +00:00
Timothy Wall 1bcde2cbf2 Allow constant pointer definition
Add multiple watches to file monitor test

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@367 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-05 17:19:28 +00:00
Timothy Wall 9a5f5851ba Perform additionl null pointer checks
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@366 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-05 15:39:52 +00:00
Timothy Wall 8c7152bb9f enable crash protection on freebsd
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@365 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 20:35:07 +00:00
Timothy Wall 5580e39447 update Structure.toArray usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@364 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:40:22 +00:00
Timothy Wall f29d58c0f0 Update toArray usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@363 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:39:00 +00:00
Timothy Wall d69e62363e remove jnlp files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@362 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:32:16 +00:00
Timothy Wall 0e0af9dcaa dev.java.net won't serve jar files properly
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@361 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:29:35 +00:00
Timothy Wall 85fee142b3 Fix jnlp links
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@360 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:26:08 +00:00
Timothy Wall a1b5a934f4 Use proper server link
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@359 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:06:41 +00:00
Timothy Wall 996b533634 Fix demo server link
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@358 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:06:08 +00:00
Timothy Wall 11fab2e58e update demos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@357 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 19:12:28 +00:00
Timothy Wall 437df3b6d4 fix projects list
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@356 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 15:15:05 +00:00
Timothy Wall 663c2fdbac update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@355 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:59:05 +00:00
Timothy Wall 4eb0e9f8aa more javadoc tweaks
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@354 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:57:53 +00:00
Timothy Wall 00a17b60f8 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@353 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:48:30 +00:00
Timothy Wall fb5f00db61 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@352 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:38:43 +00:00
Timothy Wall 0105055c3e Don't keep a strong reference to the library proxy
Keep a mapping for the proxy on calls to loadLibrary
Don't fail if no alpha on shaped window demo
Clean up a few comments

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@351 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:32:31 +00:00
Timothy Wall efe147b731 update structure/union notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@350 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:28:51 +00:00
Timothy Wall 9585302dc5 clean up symmetry on ToNative/FromNative contexts
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@349 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-29 15:11:01 +00:00
Timothy Wall 7432c0775b Clean up ant build script targets
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@348 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-29 14:35:02 +00:00
Timothy Wall 8666ac7b85 Clean up temp files on w32
Avoid empty paths in search list
Add canonical 'out-of-date' jar
Clean up ant build script targets

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@347 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-29 14:34:10 +00:00
Timothy Wall 827cbfd03c disable out-of-date native bits
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@346 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-29 13:25:44 +00:00
Timothy Wall 64a5e8f236 Don't need new specs under mingw; was due to faulty installation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@345 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-29 13:23:28 +00:00
Timothy Wall 6a60315011 build with glibc 2.3.5 (from Red Hat FC4)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@344 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-28 21:30:01 +00:00
Timothy Wall a234334f69 Fix javadoc error
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@343 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-27 22:24:04 +00:00
Timothy Wall d71acbd909 update jnlp files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@342 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-27 22:20:07 +00:00
Timothy Wall 33e672d135 add platform notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@341 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-27 16:35:57 +00:00
Timothy Wall a26a696e34 Allow ByReference types in callbacks
Clean up some Structure field error messages

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@340 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-26 14:51:24 +00:00
Wayne Meissner c63827d5a0 Updated i386-freebsd build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@339 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-20 12:09:38 +00:00
Timothy Wall 998f9f6ad0 add notes for loadLibrary options map
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@338 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-19 01:51:03 +00:00
Timothy Wall 0e188d3bff Show drop shadow on OSX BalloonManager
Fix NPE on OSX BalloonManager

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@337 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-17 13:27:37 +00:00
Timothy Wall 4a0867c5f2 add comments on library loading
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@336 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-17 12:41:16 +00:00
Timothy Wall 4fb1955303 Attempt load using System.loadLibrary before extracting
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@335 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-17 12:40:32 +00:00
Timothy Wall ef202cd8b8 update w32 files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@334 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 14:28:50 +00:00
Timothy Wall 3648b4539b fix failure messages in demo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@333 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 14:28:18 +00:00
Timothy Wall b78ac9355a Allocate executable memory for callbacks on w32
Synchronize on java callback allocation methods to avoid more complex native synchronization

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@332 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 14:28:00 +00:00
Timothy Wall f023994074 library suffix required on w32
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@331 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 14:20:31 +00:00
Timothy Wall a47e77bdf9 skip trash test if system has no apparent trash
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@330 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 13:12:35 +00:00
Timothy Wall 13773c267d update linux-i386 components (glibc 2.3.6)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@329 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 13:09:41 +00:00
Timothy Wall deccbf6d9a extract integer type with platform-specific size
remove temporary file suffix altogether

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@328 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 12:57:11 +00:00
Timothy Wall ec1f92c16a update test to proper native signature
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@327 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-15 21:25:48 +00:00
Timothy Wall 5436e605b0 Fix wchar_t* return when null
Allow Pointer[] as function argument
Fix window utils test on osx to avoid os-cast shadows

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@326 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-11 22:42:14 +00:00
Timothy Wall 949ae6a7aa add missing files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@325 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-11 19:27:43 +00:00
Timothy Wall b957c563c6 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@324 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-11 19:24:43 +00:00
Timothy Wall 36c73e1d64 make memory share public
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@323 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-05 20:28:30 +00:00
Timothy Wall d8f0925466 auto-copy native library into eclipse build area
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@322 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-04 17:15:58 +00:00
Timothy Wall 77d1b2f648 Remove unused code
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@321 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-04 14:37:57 +00:00
Timothy Wall 7a82dd3baf Fix X11 keyboard test (XQueryKeymap result is not documented)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@320 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-04 14:35:31 +00:00
Timothy Wall 7c5573199f Add explicit license file
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@319 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-03 19:18:03 +00:00
Timothy Wall 55146b70bd name license by specific version
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@318 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-03 19:17:37 +00:00
Timothy Wall c2a26458e8 Fix test failure if default encoding doesn't support extended ASCII (fall back to testing just ASCII)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@317 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-02 13:42:38 +00:00
Timothy Wall 6be895f83c change contact address for contributions
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@316 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-01 00:55:02 +00:00
Timothy Wall fcae79eb9a Show proper mapping for w32 function which accepts either integer or pointer types in a given argument
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@315 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-30 00:32:13 +00:00
Timothy Wall 9a342d979f Allow lookup of OSX framework libraries by name
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@314 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-30 00:29:38 +00:00
Timothy Wall a48a7c321d Throw UnsupportedOperationException when alpha not available and explain why, if possible
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@313 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-30 00:28:01 +00:00
Timothy Wall fd167bc19f Fix swing threading violation in test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@312 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-30 00:13:55 +00:00
Timothy Wall 11f794c9df Clean up Structure.toArray usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@311 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-30 00:12:56 +00:00
Timothy Wall 30b353fabe Make test build target fail if any tests fail
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@310 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-26 12:50:46 +00:00
Timothy Wall 61590a115c Remove unused locals
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@309 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-26 00:02:26 +00:00
Timothy Wall 982dfbdd61 Use specific structure type in toArray
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@308 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-25 23:59:31 +00:00
Timothy Wall 9a5605f5de update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@307 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-23 02:12:12 +00:00
Timothy Wall 5d62055838 Fix compilation error in file monitor example
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@306 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-20 19:51:49 +00:00
Timothy Wall 3e886a8a5b Provide optional library synchronization
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@305 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-20 19:27:57 +00:00
Timothy Wall eb1d4736b0 clean up w32 libs to use HANDLE instead of Pointer
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@304 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-19 02:00:59 +00:00
Timothy Wall affcdf49f9 Fix crash in service stop, fix callback signature
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@303 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-18 09:32:30 +00:00
Timothy Wall 06a4a3f8af Fix failing argument marshal test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@302 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-16 06:23:20 +00:00
Timothy Wall eb58d23656 update darwin components
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@301 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-15 18:26:52 +00:00
Timothy Wall ed2ee11af8 update w32 jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@300 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-15 18:13:39 +00:00
Timothy Wall 6ed833bf28 Fix GetLastError bug
Make ByReference derive from Memory

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@299 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-15 18:12:05 +00:00
Timothy Wall 196e8af786 File missed in last patch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@298 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-14 18:52:00 +00:00
Timothy Wall 17aafbc595 Allow Pointer[] as field in Structure
Clean up error messages when Structure size calculation fails

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@297 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-14 15:48:28 +00:00
Timothy Wall 1dcf8cf36c update ntservice README
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@296 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-13 20:35:08 +00:00
Timothy Wall 3fc6bc7e53 Don't wrap null pointers in PointerType
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@295 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-13 00:40:44 +00:00
Timothy Wall fce337b823 Fix 1.4 compile error
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@294 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-13 00:39:42 +00:00
Timothy Wall 6e3c4a856c Add NT service implementation from boerkel
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@293 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-12 15:51:31 +00:00
Timothy Wall 05f44f3c62 Ensure TCHAR*[] gets encoded properly on w32, wchar_t*[] on others
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@292 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-12 15:13:13 +00:00
Timothy Wall d609eed733 include build.xml in source zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@291 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-11 01:49:27 +00:00
Timothy Wall 65c4e6ad94 fix stdcall stack sizing for NativeMapped
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@290 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-11 01:49:14 +00:00
Timothy Wall 6fc11568c0 Add docs/src zips
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@289 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 18:10:41 +00:00
Timothy Wall 494aa6e090 Fix html formatting
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@288 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 15:23:43 +00:00
Timothy Wall abab91748c Add projects list
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@287 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 15:22:24 +00:00
Timothy Wall f86ef41980 update jars for darwin, linux, w32
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@286 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 14:56:20 +00:00
Timothy Wall a22191c1fb clean up type mapping table
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@285 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 14:39:31 +00:00
Timothy Wall db2a6b239e clarify contributions on web page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@284 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 14:25:02 +00:00
Timothy Wall 25726a3df9 Enable callback return values (e.g. sig_t signal(int sig, sig_t f))
Move native function proxy wrapping to CallbackReference from Structure

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@283 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-07 23:49:44 +00:00
Timothy Wall a95c4d673d Fix string decoding bug, add tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@282 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-07 20:10:34 +00:00
Wayne Meissner b6b53d7b83 Fix solaris build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@281 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-07 01:43:59 +00:00
Timothy Wall 573a5c6a53 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@280 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-06 18:07:54 +00:00
Timothy Wall 7db8868043 Enable VM crash protection on w32, linux
Move native library init from Pointer to Native
Fix Pointer.setNativeLong bug
Make library initialization explicit in Pointer/NativeLibrary
Javadoc cleanup

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@279 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-06 17:36:33 +00:00
Timothy Wall 7ee89a6e1d Remove ^Z from keyboard test, since it may suspend the test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@278 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-06 15:48:53 +00:00
Timothy Wall 5e22b1cd27 Remove check for Library interface in Library.Handler
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@277 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 14:21:36 +00:00
Wayne Meissner 2e5eee5092 Native.loadLibrary() no longer requires interface classes to extend Library.
If this breaks anything, blame Charles Nutter :-)


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@276 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 06:33:11 +00:00
Wayne Meissner b341608130 Missed during ToNativeConverter modifications
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@275 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 03:30:17 +00:00
Wayne Meissner e6e8ffb1c3 Updated build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@274 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 02:37:02 +00:00
Wayne Meissner 60c851972e Start on issue #38. Main thing I wanted to do was get the second parameter to ToNativeConverter.toNative() in there so we don't have future API breakage by adding it later.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@273 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 01:45:18 +00:00
Wayne Meissner dcfc552254 Build on Ubuntu 6.06.1 with glibc-2.3.6
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@272 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 00:41:28 +00:00
Timothy Wall 8bb92f5c19 Use type-safe pointers for w32 APIs
Simplify type-safe pointer declarations

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@271 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 16:17:10 +00:00
Timothy Wall 0ca338ade0 clarify intro
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@270 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 13:44:49 +00:00
Timothy Wall 272424d379 Fix javadoc link (frames don't show up)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@269 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 13:26:38 +00:00
Wayne Meissner 6d72f33da7 Revert r266 - Integer.valueOf() and friends are 1.5+ features, so it
breaks 1.4 support



git-svn-id: https://svn.java.net/svn/jna~svn/trunk@268 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 12:45:58 +00:00
Wayne Meissner c0fab06356 Use the full path to /usr/bin/libtool - macports installs GNU libtool in the path before /usr/bin/libtool.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@267 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 06:01:54 +00:00
Wayne Meissner 1423a7ce91 Implement (most of) the fixes from issue #35.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@266 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 04:26:22 +00:00
Wayne Meissner 053a432804 Fixup library searching for 32bit VM on 64bit OS scenarios
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@265 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 12:08:50 +00:00
Wayne Meissner f50129baa3 Build for FreeBSD/i386
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@264 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 09:17:18 +00:00
Wayne Meissner 9150e8f188 Don't try to use the library extension as the suffix. System.load()
doesn't appear to care what the library you tell it to load is called.

Could be a possible source of why it won't load on multi-byte charsets 
under windows.



git-svn-id: https://svn.java.net/svn/jna~svn/trunk@263 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 08:26:29 +00:00
Wayne Meissner b637ab3ceb Pass the Method of the Library subclass that invoked the Function, to the FromNativeConverter.
Also optimized the code in Library.Handler so only one Map lookup per function invoke is needed.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@262 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 08:09:06 +00:00
Wayne Meissner 32d38dd876 Native build for Solaris/sparc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@261 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 08:05:26 +00:00
Wayne Meissner a04f4bd4b2 Unbreak 64bit sparc support
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@260 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 07:32:44 +00:00
Wayne Meissner ad68219568 Ensure the NativeLibrary does not get prematurely garbage collected when using something like:
Function f = NativeLibrary.getInstance("c").getFunction("printf");



git-svn-id: https://svn.java.net/svn/jna~svn/trunk@259 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 06:25:46 +00:00
Timothy Wall af117d810d Clean up tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@258 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 03:53:34 +00:00
Timothy Wall 5d764abdc6 Add auto-conversion for custom types
Fix X11 lib for 64-bit use

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@257 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 01:20:52 +00:00
Timothy Wall a9e9c69265 Update webpage and javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@256 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 01:15:30 +00:00
Wayne Meissner 461e86eb82 64bit fixes, and add local queue.h for solaris builds
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@255 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 00:49:44 +00:00
Wayne Meissner 7e87ffa0fd Fix int32 definition for 64bit arches
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@254 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-02 23:34:14 +00:00
Timothy Wall 7bfa698796 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@253 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-01 07:34:20 +00:00
Timothy Wall 285f64ed62 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@252 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-01 07:28:26 +00:00
Timothy Wall b13b1d7b70 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@251 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-01 07:23:58 +00:00
Timothy Wall 212e0cd812 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@250 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-01 07:23:14 +00:00
Timothy Wall 589a8e101d update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@249 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 18:52:34 +00:00
Timothy Wall b8b4169b1a update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@248 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 18:33:06 +00:00
Timothy Wall e8aac64083 update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@247 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 18:27:50 +00:00
Timothy Wall 8e3ae9bb85 Update TODO
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@246 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 18:18:19 +00:00
Timothy Wall 14a549928f Fix build on darwin-i386
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@245 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 18:06:03 +00:00
Timothy Wall 83e1fb715e Fix UnsatisfiedLinkError calling toString on a Library interface
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@244 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 16:44:43 +00:00
Timothy Wall aeeac8e343 Add callback tests for smaller int types
Copy generic java.nio.Buffer support from v3 branch + tests
Copy missed sparc-isms from v3 branch for building sunos variants
Add stubs for platform-specific jars
Include libffi testsuite
Remove /lib64 references as per v3 branch
Auto-generate os prefix from os.name (as per v3 branch) to automatically handle new targets
Update overview to include Buffer, function pointer info
Include src.zip and doc.zip in dist generation

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@243 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 14:05:06 +00:00
Timothy Wall 5fc6d50486 Avoid wrapping a native callback proxy with a CallbackReference proxy
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@242 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-30 16:17:21 +00:00
Timothy Wall edc7c111cb Clean up varargs
Add per-field Structure read/write
Avoid automatic writes to 'volatile' structure fields
Read/wrap function pointers in Structure fields
Disallow Memory/Function as declared Structure fields

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@241 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-30 16:04:01 +00:00
Timothy Wall 05a754bc92 Use libffi instead of custom assembly (tested for darwin (universal), linux-i386, win32-x86
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@240 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-29 20:19:39 +00:00
Timothy Wall dff58c56fb Remove superfluous exception checks, enable peer access on OSX
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@239 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-28 14:54:07 +00:00
Timothy Wall 58709a1d32 Support mingw32 builds
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@238 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-28 13:27:22 +00:00
Timothy Wall 554567fa82 Copy issue #25 fix from v3 branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@237 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-28 13:22:50 +00:00
Timothy Wall 3ad51db9c2 Copy fix for issue #32 from v3 branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@236 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-28 13:07:04 +00:00
Timothy Wall 007d74ee23 Fix OSX link option
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@188 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-30 23:09:50 +00:00
Timothy Wall cd15214d77 Fix javadoc comments
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@187 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-30 20:45:43 +00:00
Timothy Wall 32eca24468 Clean up OSX build options
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@186 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-30 20:45:13 +00:00
Timothy Wall a96e25ef5d fix broken link
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@185 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-24 18:36:05 +00:00
Timothy Wall 5087fb1904 update doc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@184 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-24 18:26:12 +00:00
Timothy Wall 2c4af20cb0 update javadoc for build 2.5
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@183 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-24 18:11:27 +00:00
tromey e680ecfbfc Pulled in libffi from gcc trunk.
Fixed build and install for standalone use.
2006-12-24 23:12:15 +00:00
root e7ba089659 sourcware.org 2006-06-04 23:22:24 +00:00
root 0cd4aa24e2 Add LockDir 2004-05-30 01:51:57 +00:00
green 5826120fbd Add link to Gianni's web site. 2003-11-04 06:09:08 +00:00
jsm 220aa4b27d Newer, better, increased from before! (list of acceptable anon usernames) 2003-01-21 08:07:42 +00:00
green 1c3adc892c Fixed Cygnus references. 2002-12-06 01:28:03 +00:00
green 4af66bb62f Testsuite fixes. 2001-10-21 19:18:42 +00:00
green 5435965f90 * include/ffi_common.h: Delete, after moving contents to...
* include/ffi_private.h: Subsume contents of ffi_common.h.
        * include/Makefile.am (noinst_HEADERS): Remove ffi_common.h.
        * include/Makefile.in: Rebuilt.
        * arm/ffi.c, m68k/ffi.c, mips/ffi.c, powerpc/ffi.c, s390/ffi.c,
        ia64/ffi.c: Include ffi_private.h, not ffi_common.h.
        * alpha/ffi.c, sparc/ffi.c, x86/ffi.c: Don't include ffi_common.h.
        * types.c, raw_api.c, java_raw_api.c, prep_cif.c: Don't include
        ffi_common.h.
        * debug.c: Include ffi_private.h instead of ffi_common.h.

        * mips/ffi.c (calc_n32_struct_flags): Make static.
        (FIX_ARGP): Remove call to debugging routine ffi_stop_here.

        * mips/n32.S: Include ffi_private.h.
        * mips/o32.S: Include ffi_private.h.
2001-04-23 00:32:03 +00:00
green 6fdb7de0fe * README: Update some comments.
* Makefile.am (SUBDIRS): Add include so ffi.h gets installed.
        * Makefile.in: Rebuilt.

        * include/ffi.h: Change ALPHA to __alpha__ and SPARC to __sparc__.
        * types.c: Ditto.
        * prep_cif.c (ffi_prep_cif): Ditto.

        * alpha/ffi.c, alpha/osf.S, sparc/ffi.c, sparc/v8.S, sparc/v9.S:
        Include ffi_private.h.

        * include/ffi_private.h (FFI_TYPE_LAST): Define.
2001-04-22 19:38:34 +00:00
green bc7144b01b Moved files from old home 2001-04-22 18:28:36 +00:00
green e57279831e These are dead. 2001-04-22 18:23:47 +00:00
green 7247436b5f All these files live somewhere else now. 2001-04-22 18:22:43 +00:00
green a8b0d40ff9 Many changes. Not quite there yet. 2001-04-22 18:17:14 +00:00
green f893d22733 Moved m68k files 2001-04-22 18:13:22 +00:00
green 688ddfeced New, target indepentent, header 2001-04-22 18:12:33 +00:00
green f9e40776d4 Many changes. 2001-04-22 18:11:57 +00:00
green 8c1d2eb47f Many changes 2001-04-22 18:10:47 +00:00
green 1359dfc658 Moved ia64 files 2001-04-22 18:10:20 +00:00
green 6e2de5eee3 Moved arm files 2001-04-22 18:08:11 +00:00
green 8807355af3 Many many updates. Merge from gcc and then some. 2001-04-09 00:58:38 +00:00
green f7e9f91ade Mnay fixes. 2000-04-17 03:32:37 +00:00
green c4860de618 Merge from libgcj. Merged patches from net. See ChangeLog for details. 2000-04-17 03:18:46 +00:00
jsm c578b58314 1999-10-09 Jason Molenda (jsm@bugshack.cygnus.com)
* CVSROOT/auto_checkout, CVSROOT/commit_prep, CVSROOT/log_accum:
	Deleted; generic versions now used for all repositories.

	* CVSROOT/commitinfo, CVSROOT/loginfo:  Change pathnames to
	generic versions.

        * CVSROOT/checkoutlist:  Don't try to check out the removed
        files any longer.
1999-10-09 20:18:16 +00:00
jsm acdb200512 1999-10-09 Jason Molenda (jsm@bugshack.cygnus.com)
* CVSROOT/auto_checkout, CVSROOT/commit_prep, CVSROOT/log_accum:
	Deleted; generic versions now used for all repositories.

	* CVSROOT/commitinfo, CVSROOT/loginfo:  Change pathnames to
	generic versions.

        * CVSROOT/checkoutlist:  Don't try to check out the removed
        files any longer.
1999-10-09 20:18:15 +00:00
green e75be655ce New configury 1999-08-08 13:16:41 +00:00
green d6669a0dd5 * include/ffi.h.in: Try to work around messy header problem
with PACKAGE and VERSION.

	* configure: Rebuilt.
	* configure.in: Change version to 2.00-beta.

        * fficonfig.h.in: Rebuilt.
	* acconfig.h (FFI_NO_STRUCTS, FFI_NO_RAW_API): Define.

	* src/x86/ffi.c (ffi_raw_call): Rename.
1999-08-08 13:05:12 +00:00
green 4819d52b00 New file for Kresten's closure work 1999-08-04 18:02:34 +00:00
green 2dbf801eb4 Kresten's closure work. Initial checkin. 1999-08-04 18:00:05 +00:00
green d170961701 * configure.in: Add x86 and powerpc BeOS configurations.
From Makoto Kato <m_kato@ga2.so-net.ne.jp>.
1999-07-08 14:36:52 +00:00
jsm c7747d9769 1999-05-12 Jason Molenda (jsm@bugshack.cygnus.com)
* index.html: Add links to libffi* mail list archives.
1999-05-12 23:32:16 +00:00
green dd2aa9a8de * configure.in: Add warning about this being beta code.
Remove src/Makefile.am from the picture.
	* configure: Rebuilt.
	* Makefile.am: Move logic from src/Makefile.am.  Add changes
	to support libffi as a target library.
	* Makefile.in: Rebuilt.
	* aclocal.m4, config.guess, config.sub, ltconfig, ltmain.sh:
	Upgraded to new autoconf, automake, libtool.
	* README: Tweaks.
	* LICENSE: Update copyright date.
	* src/Makefile.am, src/Makefile.in: Removed.
1999-05-06 05:34:36 +00:00
green 4e9452abed Updated to new automake, libtool, autoconf - nothing works :-) 1999-05-05 22:06:13 +00:00
jsm 6d3b2bddaf 1999-04-26 Jason Molenda (jsm@bugshack.cygnus.com)
* index.html: Missed a reference to libffi-discuss@cygnus.com.  Fixed.
1999-04-26 15:55:28 +00:00
jsm ebc6a9c28a 1999-04-26 Jason Molenda (jsm@bugshack.cygnus.com)
* index.html: Change links to ftp directory to point to sourceware
        directory.
        Change mailing list subscription forms to point to sourceware lists.
1999-04-26 15:53:29 +00:00
jsm 78ffc52a8b Standard sourceware setup. 1999-04-18 01:33:21 +00:00
jsm b4d77e827d Small typeo. (I wouldn't bother except that it made the sentence hard
for me to parse on a casual read.)
1998-11-30 11:11:25 +00:00
jsm bfb73f08fd A few cleanups. Most notably, point to the correct subscribe cgi-bin
script.
1998-11-30 10:44:55 +00:00
green af8b7f037c * index.html: Reformatted and updated to reflect hosting on
sourceware.cygnus.com (new mailing lists, etc).
1998-11-30 06:20:05 +00:00
green 334f0b0609 initial snapshot of documentation 1998-11-29 16:56:12 +00:00
green 3ab5cb4a1d Initial revision 1998-11-29 16:56:10 +00:00
green d2a9eb5a8b This commit was generated by cvs2svn to compensate for changes in r7, which
included commits to RCS files with non-trunk default branches.
1998-11-29 16:48:16 +00:00
green bc75c54bd3 Import of v1 code. 1998-11-29 16:48:16 +00:00
jsm d3782ec816 Send commit messages to mailing lists. 1998-11-20 20:18:00 +00:00
jsm 8d8d3843c4 initial checkin 1998-10-01 22:08:36 +00:00
jsm 49634f3bf2 Add standard setup. 1998-10-01 22:08:35 +00:00
jsm c64a84c769 Add readers and standard modules file. 1998-10-01 22:08:34 +00:00
jsm 9813273b07 initial checkin 1998-10-01 22:08:33 +00:00
1364 arquivos alterados com 595729 adições e 68350 exclusões
Arquivo executável → Arquivo normal
+9 -8
Ver Arquivo
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" output="build.eclipse/test-classes" path="test"/>
<classpathentry kind="lib" path="lib/junit.jar" sourcepath="/DEV/junit/src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="build.eclipse/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" output="build.eclipse/test-classes" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="lib" path="lib/test/reflections-0.9.8.jar"/>
<classpathentry kind="output" path="build.eclipse/classes"/>
</classpath>
+23
Ver Arquivo
@@ -0,0 +1,23 @@
build
build-d64
build.eclipse
build.number
build.clover
.metadata
.DS_Store
bin
contrib/ntservice/dist
contrib/platform/dist
doc
*~
**/*~
dist/*.asc
dist/*-sources.jar
dist/*-javadoc.jar
dist/src-mvn.zip
dist/out-of-date.jar
perf*.txt
native/libffi/doc/libffi.info
junit-*
pom-jna.xml.asc
pom-jna-platform.xml.asc
+17
Ver Arquivo
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>jnalib</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
+202
Ver Arquivo
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.
+722
Ver Arquivo
@@ -0,0 +1,722 @@
NOTE: as of JNA 4.0, JNA is now dual-licensed under LGPL and ASL (see LICENSE).
NOTE: JNI native support is typically incompatible between minor versions, and almost always incompatible between major versions.
Next Release
============
Features
--------
* Updated AIX natives and build - [@twall](https://github.com/twall).
* [#290](https://github.com/twall/jna/pull/290): Improved the stacktrace for the exceptions thrown by `com.sun.jna.Structure` - [@ebourg](https://github.com/ebourg).
* [#332](https://github.com/twall/jna/pull/332): Added Win32 Monitor Configuration API in `com.sun.jna.platform.win32.Dxva2` - [@msteiger](https://github.com/msteiger).
* Added Winspool monitor sample and updated Kernel32, WinBase, Winspool - [@wolftobias](https://github.com/wolftobias).
* Added Some minor changes to MS Office samples Test and small changes to the MS Office samples Bug Fixes - [@wolftobias](https://github.com/wolftobias).
* [#333](https://github.com/twall/jna/pull/333): Added `CoTaskMemAlloc`, `CoTaskMemRealloc` and `CoTaskMemFree` to `com.sun.jna.platform.win32.Ole32` - [@msteiger](https://github.com/msteiger).
* [#334](https://github.com/twall/jna/pull/334): Added `com.sun.jna.platform.win32.Shell32.SHGetKnownFolderPath` and `KnownFolders` GUID constants - [@msteiger](https://github.com/msteiger).
Bug Fixes
---------
* [#319](https://github.com/twall/jna/pull/319): Fix direct-mapping type-mapped pointer result types - [@marco2357](https://github.com/marco2357).
* Added Variant and TlbImp Fixes - [@wolftobias](https://github.com/wolftobias).
Release 4.1
===========
Features
--------
* Added `com.sun.jna.platform.win32.Advapi32Util.registryCloseKey` - [@falldog](https://github.com/falldog).
* Enabled platform tests to be run w/o building native bits - [@twall](https://github.com/twall).
* Added COM/Typelib java code generator `com.sun.jna.platform.win32.COM.tlb.TlbImp` - [@wolftobias](https://github.com/wolftobias).
* [#226](https://github.com/twall/jna/issues/226): Added OSGI information to jna-platform.jar - [@brettwooldridge](https://github.com/brettwooldridge).
* [#267](https://github.com/twall/jna/pull/267): Added support for Windows RAS32 API, `com.sun.jna.platform.win32.Rasapi32` and `Rasapi32Util` - [@kc7bfi](https://github.com/kc7bfi).
* [#101](https://github.com/twall/jna/issues/101): Modify `com.sun.jna.platform.win32.Advapi32Util.registryGet*` API to support `KEY_WOW64` option - [@falldog](https://github.com/falldog).
* [#271](https://github.com/twall/jna/pull/271): Added `com.sun.jna.platform.win32.Gdi32.ChoosePixelFormat` and `SetPixelFormat` - [@kc7bfi](https://github.com/kc7bfi).
* [#271](https://github.com/twall/jna/pull/271): Added `com.sun.jna.platform.win32.OpenGL32`, `OpenGL32Util` and `WinOpenGL` - [@kc7bfi](https://github.com/kc7bfi).
* [#250](https://github.com/twall/jna/pull/250): Added `com.sun.jna.platform.win32.Kernel32.GetPrivateProfileSection`, `GetPrivateProfileSectionNames` and `WritePrivateProfileSection` and corresponding `Kernel32Util` helpers - [@quipsy-karg](https://github.com/quipsy-karg).
* [#287](https://github.com/twall/jna/pull/287): Added `DBTF_MEDIA` and `DBTF_NET` to `com.sun.jna.platform.win32.DBT` - [@daifei4321](https://github.com/daifei4321).
* [#295](https://github.com/twall/jna/pull/295): Added `com.sun.jna.platform.win32.Kernel32.ResetEvent` - [@manithree](https://github.com/manithree).
* [#301](https://github.com/twall/jna/pull/301): Added `accessCheck` to `com.sun.jna.platform.win32.Advapi32Util`, `MapGenericMask` and `AccessCheck` to `com.sun.jna.platform.win32.Advapi32`, `PRIVILEGE_SET` and `GENERIC_MAPPING` to `com.sun.jna.platform.win32.WinNT` - [@BusyByte](https://github.com/BusyByte).
Bug Fixes
---------
* Fixed inconsistent behavior on `Structure.ByValue` fields within a `Structure` - [@twall](https://github.com/twall).
* [#279](https://github.com/twall/jna/issues/279): Accommodate FreeBSD libc loading - [@sevan](https://github.com/sevan).
* [#287](https://github.com/twall/jna/pull/287): Fixed contrib `win32.Win32WindowDemo`, now showing the added/removed drive letter, and whether the event is about media in drive or physical drive - [@daifei4321](https://github.com/daifei4321).
* [#300](https://github.com/twall/jna/issues/300): Fix stdcall argument alignment - [@twall](https://github.com/twall).
Release 4.0
===========
Features
--------
* Added ASL licensing to facilitate distribution - [@twall](https://github.com/twall).
* [#109](https://github.com/twall/jna/issues/109): Set default Java compatibility level to 1.6 - [@twall](https://github.com/twall).
* [#209](https://github.com/twall/jna/issues/209): Improved default performance saving last error results - [@twall](https://github.com/twall).
* Use predictable names for CPU architecture prefix (namely x86, x86-64); names correspond to OSGI processor values - [@twall](https://github.com/twall).
* Avoid superfluous Structure memory allocation from native - [@twall](https://github.com/twall).
* Added `Library.OPTION_CLASSLOADER`, which enables loading native libraries from any class loader (including JNA's native library). This enables parallel dependencies on JNA (e.g. within a tomcat deployment without having to include JNA in the app server environment) - [@twall](https://github.com/twall).
* Use per-library String encoding settings (see `Native.getDefaultStringEncoding()` and `Structure.getStringEncoding()`) - [@twall](https://github.com/twall).
* Added memory dump for debugging (see `com.sun.jna.Memory`) - [@twall](https://github.com/twall).
* Improved caching of Structure alignment, type mapping, and encoding information - [@twall](https://github.com/twall).
* [#225](https://github.com/twall/jna/pull/225): Added `platform.win32.Kernel32.GetLogicalProcessorInformation` and `platform.win32.Kernel32Util.getLogicalProcessorInformation` - [@trejkaz](https://github.com/trejkaz).
* [#236](https://github.com/twall/jna/issues/236): Auto-strip profiler native method prefix specified by `jna.profiler.prefix`, which defaults to $$YJP$$ - [@twall](https://github.com/twall).
* Added `jna.debug_load` property to diagnose library loading issues - [@twall](https://github.com/twall).
* Throw explicit `IllegalArgumentException` when `Structure.ByReference` is used where it shouldn't be (can result in multiply freed memory or other unexpected behavior) - [@twall](https://github.com/twall).
* [#243](https://github.com/twall/jna/issues/243): Automatically accommodate long library paths on Windows which would otherwise fail - [@twall](https://github.com/twall).
* [#241](https://github.com/twall/jna/issues/241) - Added `com.sun.jna.platform.win32.Shell32.SHAppBarMessage` - [@bsorrentino](https://github.com/bsorrentino).
* Make `Structure.read/writeField()` protected to facilitate per-field overrides - [@twall](https://github.com/twall).
* Speed up callback lookup where large numbers of native function pointers are in use - [@twall](https://github.com/twall).
Bug Fixes
---------
* [#213](https://github.com/twall/jna/pull/213): Fixed `Structure.toString()` not to dump memory when `jna.dump_memory` is false - [@tomohiron](https://github.com/tomohiron).
* Use dedicated TLS to indicate callback detach state, to avoid any potential conflicts with last error storage - [@twall](https://github.com/twall).
* [#173](https://github.com/twall/jna/issues/173): Fixed OSX 10.8/Xcode 4+ builds, web start path with Oracle 1.7 JDK - [@mkjellman](https://github.com/mkjellman).
* [#215](https://github.com/twall/jna/issues/215): Forced use of XSI `strerror_r` on linux - [LionelCons](https://github.com/LionelCons).
* [#214](https://github.com/twall/jna/issues/214): Don't map library names when an absolute path is provided - [@twall](https://github.com/twall).
* [#218](https://github.com/twall/jna/issues/218): Explicitly handled broken Android `SecurityManager` implementation - [@twall](https://github.com/twall).
* [#223](https://github.com/twall/jna/issues/223): Fixed layout/size derivation for unions - [@twall](https://github.com/twall).
* [#229](https://github.com/twall/jna/issues/229): Added `CreateProcessW` (Unicode version) - [@twall](https://github.com/twall).
* Avoid solaris/x86 JVM bug w/library open flags - [@twall](https://github.com/twall).
* Fixed NPE returning wide string from a direct-mapped function - [@twall](https://github.com/twall).
* [#237](https://github.com/twall/jna/issues/237): Fix LastErrorException/getLastError on AIX - [@skissane](https://github.com/skissane).
* [#228](https://github.com/twall/jna/issues/228): Fix win32/win64 crashes due to LastErrorException buffer overruns (`snprintf` on windows is broken) - [@davidhoyt](https://github.com/davidhoyt).
Release 3.5.2
=============
Features
--------
* Basic [COM support](https://github.com/twall/jna/blob/master/www/PlatformLibrary.md) for w32 - [@wolftobias](https://github.com/wolftobias).
* Avoid superfluous Structure memory allocation by using Structure(Pointer) ctors if available - [@twall](https://github.com/twall).
* [PR#120](https://github.com/twall/jna/pull/120): Provide methods for extracting native libraries from the class path for use by JNA - [@Zlika](https://github.com/Zlika).
* [PR#163](https://github.com/twall/jna/pull/163): The Java `GUID` structure can be used directly as alternative to `Ole32Util.getGUIDFromString()` - [@wolftobias](https://github.com/wolftobias).
* [PR#163](https://github.com/twall/jna/pull/163): Ported Win32 `dbt.h` - [@wolftobias](https://github.com/wolftobias).
* [PR#163](https://github.com/twall/jna/pull/163): Added Win32 `WTSRegisterSessionNotification()` and `WTSUnRegisterSessionNotification()` from `Wtsapi32.dll` - [@wolftobias](https://github.com/wolftobias).
* [PR#163](https://github.com/twall/jna/pull/163): Added Win32 `native_window_msg` that creates windows, registers for USB device and logon/logoff notifications - [@wolftobias](https://github.com/wolftobias).
* [PR#178](https://github.com/twall/jna/pull/178): Added Win32 `USER_INFO_10` structure from `LMAccess.h` - [@davidmc24](https://github.com/davidmc24).
* [PR#192](https://github.com/twall/jna/pull/192): Added Win32 `SHGetSpecialFolderPath()` and initialization file (.ini) API functions from `kernel32.dll` - [@headcrashing](https://github.com/headcrashing).
* [PR#194](https://github.com/twall/jna/pull/194): Added Unit Test for `CLSIDFromProgID()` - [@headcrashing](https://github.com/headcrashing).
* [PR#196](https://github.com/twall/jna/pull/196): Added Win32 `RegisterWindowMessage()` and new wrapper `User32Util` for convenient use of `RegisterWindowMessage`, `CreateWindow` and `CreateWindowEx` - [@headcrashing](https://github.com/headcrashing).
* [PR#187](https://github.com/twall/jna/pull/187): Allow StructureFieldOrderTest unit test in platform project to run on Linux. - [@bhamail](https://github.com/bhamail).
Bug Fixes
---------
* [PR#180](https://github.com/twall/jna/pull/180): Fix: added missing fields in `XEvents.getFieldOrder()` - [@xwizard](https://github.com/xwizard).
* [PR#183](https://github.com/twall/jna/pull/183): Fix `LMAccess.GROUP_INFO_3.getFieldOrder()` to return correct fields names - [@bhamail](https://github.com/bhamail).
* [PR#187](https://github.com/twall/jna/pull/187): Fix `getFieldOrder()` to return correct field names for some X11 structures - [@bhamail](https://github.com/bhamail).
* Remove deprecated methods on Memory (getSize,isValid) and Structure (getSize) - [@twall](https://github.com/twall).
* Remove problematic AWT check via `Class.forName("java.awt.Component")` (see [here](https://bugs.eclipse.org/bugs/show_bug.cgi?id=388170)) - [@twall](https://github.com/twall).
* [PR#210](https://github.com/twall/jna/pull/210) Add OSGI processor specs for Mac OS X - [@bertfrees](https://github.com/bertfrees).
* [PR#174](https://github.com/twall/jna/pull/174): Recompile linux-amd64 natives to remove glibc-2.11 dependencies, now requires only 2.2.5 or better - [@twall](https://github.com/twall).
* [PR#183](https://github.com/twall/jna/pull/183): Added `StructureFieldOrderInspector` unit test utility to scan for `Structure` field issues; see: `com.sun.jna.platform.StructureFieldOrderTest.testMethodGetFieldOrder` - [@bhamail](https://github.com/bhamail).
* [PR#187](https://github.com/twall/jna/pull/187): Allow `StructureFieldOrderTest` unit test in platform project to run on Linux - [@bhamail](https://github.com/bhamail).
* [#206](https://github.com/twall/jna/issues/206): Fix `moveToTrash()` on OSX to work with symlinks - [@twall](https://github.com/twall).
* Fix NPE if `Thread.getContextClassLoader()` returns `null` - [@twall](https://github.com/twall).
Release 3.5.1
=============
Bug Fixes
---------
* Fix bug where string fields sometimes failed to be writtern - [@twall](https://github.com/twall) (roman kisluhin).
* [PR#145](https://github.com/twall/jna/pull/145): Fix `Netapi32Util.getDomainTrusts()` returns "empty" domain object - [@aikidojohn](https://github.com/aikidojohn).
* [PR#145](https://github.com/twall/jna/pull/145): Fix `Netapi32.getDC()` - added missing fields in `DOMAIN_CONTROLLER_INFO` - [@aikidojohn](https://github.com/aikidojohn).
* [PR#151](https://github.com/twall/jna/pull/151): 'platform.jar' in the dist directory was not updated for release 3.5.0. (The 'platform.jar' published to maven central was correct.)
Release 3.5.0
=============
Features
--------
* [#62](https://github.com/twall/jna/issues/62) If a callback is required to reside in a DLL, use [`DLLCallback`](http://twall.github.com/jna/3.5.1/javadoc/com/sun/jna/win32/DLLCallback.html) to tag your Callback object - [@twall](https://github.com/twall).
* `Structure.getFieldOrder()` supersedes `Structure.setFieldOrder()` and is now required - [@twall](https://github.com/twall).
* Search `~/Library/Frameworks` and `/Library/Frameworks` on OSX - [@shaneholloway](https://github.com/shaneholloway).
* Automatic cleanup of native threads (based on suggestions from neil smith) - [@twall](https://github.com/twall).
* Add `android-arm` target - [@ochafik](https://github.com/ochafik), [@twall](https://github.com/twall).
* Add `jna.tmpdir` to override temporary JNA storage location - [@twall](https://github.com/twall).
* Add `EXTRA_MAKE_OPTS` ant property to override make variables - [@twall](https://github.com/twall).
* Add `Library.OPTION_OPEN_FLAGS` to customize dlopen behavior - [@twall](https://github.com/twall).
* [#113](https://github.com/twall/jna/issues/113), [#114](https://github.com/twall/jna/issues/114): Add support for GNU/kFreeBSD and debian multi-arch distros - [@twall](https://github.com/twall).
Bug Fixes
---------
* Fix `Advapi32Util.registryGetValues()` tried to allocate memory for a zero-length `REG_BINARY` value - [@phailwhale22](https://github.com/phailwhale22).
* Fix crash in direct mode callbacks with certain type conversions - [@twall](https://github.com/twall).
* More thoroughly propagate unexpected exceptions generated in jnidispatch - [@twall](https://github.com/twall).
* Cleanup maven poms and publishing to central repo - [@bhamail](https://github.com/bhamail).
* [#129](https://github.com/twall/jna/issues/129): Allow `Memory` field in structure - [@twall](https://github.com/twall).
* Preserve `PointerType` fields on `Structure.read()` if unchanged - [@twall](https://github.com/twall).
* [#128](https://github.com/twall/jna/issues/128): Fix masking extracting DWORD upper and lower WORD values - [@twall](https://github.com/twall).
* [#135](https://github.com/twall/jna/issues/135): Fix for `Advapi32Util.registryGetValues()` when reading zero length values - [@danwi](https://github.com/danwi).
Release 3.4.2
=============
Features
--------
* Add `platform.win32.Kernel32.GetEnvironmentVariable` and `platform.win32.Kernel32Util.getEnvironmentVariable` - [@dblock](https://github.com/dblock).
* Moved `Kernel32.dll` function definitions from `WinNT.java` into `Kernel32.java` - [@dblock](https://github.com/dblock).
* Provide `toPointer()` methods on all `_PTR` types (platform win32) - [@twall](https://github.com/twall).
* Provide `ant -Dskip-native` to skip platform native build - [@twall](https://github.com/twall).
* Provide `ant -Dheadless=true` to run unit tests headless - [@twall](https://github.com/twall).
* Added Windows dev environment instructions - [@twall](https://github.com/twall).
Bug Fixes
---------
* Ensure platform win32 classes use unsigned where appropriate (`ULONG_PTR`, `UINT_PTR`, `ULONGLONG`, `WORD`, `DWORDLONG`) - [@twall](https://github.com/twall).
* [#71](https://github.com/twall/jna/issues/71), [#73](https://github.com/twall/jna/issues/73): Fix OSGI entries in manifest - [@twall](https://github.com/twall).
* [#78](https://github.com/twall/jna/issues/78): Fix NPE in `platform.win32.Netapi32Util.getDomainTrusts` - [@dblock](https://github.com/dblock).
* Fix: auto-sync memory for `struct**` arguments (array of struct pointers) - [@twall](https://github.com/twall).
* Fix: `platform.win32.Secur32.AcquireCredentialsHandle`, `InitializeSecurityContext` and `AcceptSecurityContext` on Win32 64-bit - [@dblock](https://github.com/dblock).
* Fix: avoid overwriting native `char *` or `wchar_t *` fields within structures when unmodified (similar to current operation with pointers) - [@twall](https://github.com/twall).
* Fix: `platform.win32.DsGetDC.DS_DOMAIN_TRUSTS` and `DsEnumerateDomainTrusts` on Win32 64-bit - [@trejkaz](https://github.com/trejkaz).
* Fix: Crash freeing the wrong pointer in `Netapi32Util.getDomainTrusts` - [@trejkaz](https://github.com/trejkaz).
* [#100](https://github.com/twall/jna/issues/100): Fix `platform.win32.W32FileMonitor` - [@dblock](https://github.com/dblock).
* Return INT_PTR from `platform.win32.Shell32.ShellExecute`, since returning
`HINSTANCE` is useless.
* Fix runtime error in some instances where Structure.setFieldOrder is used (never return self when sharing AutoAllocated memory).
* [#107](https://github.com/twall/jna/issues/107): `Structure.clear()` always calls `ensureAllocated()` to avoid NPE.
* Ensure internal memory pointer is *always* allocated when calling `Structure.useMemory()`, even if layout is not yet determined.
Release 3.4.1
=============
Features
--------
* Add 'unsigned' modifier to IntegerType.
* Add to `platform.win32.User32`: `GetLastInputInfo`.
* Add `platform.win32.WinNT.GetFileType` and `platform.win32.Kernel32Util.getFileType`.
* Add to `platform.win32.Kernel32Util`: `getFileType`.
Bug Fixes
---------
* Re-build linux-amd and linux-i386 against older versions of glibc (2.2.5 and
2.1.3 respectively).
* Properly initialize first printer info struct in winspool library.
* Properly support getting and setting zero-array-length `REG_MULTI_SZ` values on Win32.
* Fixed SID in Win32 `USER_INFO_23` and `GROUP_INFO_3`.
* Fixed passing domain name into Win32 `Netapi32Util.getUserInfo`.
Release 3.4.0
=============
Features
--------
* Provide `jna.nosys=true` to avoid loading any system-provided JNA (useful for local build/development).
* Allow override of default jnidispatch library name with `jna.boot.library.name` system property.
* Throw an Error if a system install of JNA is incompatible or if JNA's JNI library does not match.
* Disable automatic jnidispatch unpacking with `jna.nounpack=true`.
* Automatically look up system error messages for LastErrorException.
* Improved callback thread-mapping support; re-use, rename, and group callback
threads.
* Cache structure layout results, improving performance of structure creation.
* linux/arm 32-bit support (hardware provided by Alex Lam).
* linux/ppc 32-bit support (hardware provided by Fritiof Hedman).
* Preliminary linux/ia64, linux/ppc64 support (thanks to Laurent Guerby and the GCC compile farm).
* Windows CE/Mobile support (w32ce-arm) (resources provided by andrea antonello and Hydrologis SRL).
* linux multi-arch support (kohsuke).
* Added REG_QWORD registry type support
* Add to `platform.unix.x11`: `XGrabKey`, `XUngrabKey`, `XSetErrorHandler`.
* Add to `platform.mac.Carbon`: `GetEventDispatcherTarget`, `InstallEventHandler`, `RegisterEventHotKey`, `GetEventParameter`, `RemoveEventHandler`, `UnregisterEventHotKey`.
* Add to `platform.win32.Kernel32`: `CopyFile`, `MoveFile`, `MoveFileEx`, `CreateProcess`, `SetEnvironmentVariables`, `GetFileTime`, `SetFileTime`, `SetFileAttributes`, `DeviceIoControl`, `GetDiskFreeSpaceEx`, `CreateToolhelp32Snapshot`, `Process32First`, `Process32Next`.
* Add to `platform.win32.Msi`: `MsiGetComponentPath`, `MsiLocateComponent`, `MsiGetProductCode`, `MsiEnumComponents`.
* Add to `platform.win32.User32`: `RegisterHotKey`, `UnregisterHotKey`
* Add to `platform.win32.SetupApi`: `SetupDiGetClassDevs`, `SetupDiDestroyDeviceInfoList`, `SetupDiEnumDeviceInterfaces`, `SetupDiGetDeviceInterfaceDetail`, `SetupDiGetDeviceRegistryProperty`.
* Add `platform.win32.Shell32.ShellExecute`.
* Add to `platform.win32.User32`: `SetParent`, `IsWindowVisible`, `MoveWindow`, `SetWindowPos`, `AttachInputThread`, `SetForegroundWindow`, `GetForegroundWindow`, `SetFocus`, `SendInput`, `WaitForInputIdle`, `InvalidateRect`, `RedrawWindow`, `GetWindow`, `UpdateWindow`, `ShowWindow`, `CloseWindow`.
* Add to `platform.win32.Version`: `GetFileVersionInfoSize`, `GetFileVersionInfo`, `VerQueryValue`.
* Add to `platform.win32.Advapi32`: `GetFileSecurity`, `RegQueryValueEx(...Long...)`.
* Add to `platform.win32.Netapi32`: `NetUserGetInfo`.
Bug Fixes
--------
* Revise cleanup of in-use temporary files on win32 (issue 6).
* Fix structure alignment issues on linux/ppc.
* Fix structure alignment issues on linux/arm.
* Account for NIO Buffer position (JIRA issue 185).
* Avoid crash with very long Strings (> 150k in length).
* Fix bug tracking Memory with an associated direct ByteBuffer.
* Fix bug handling structs by value when type mappers are in effect (JIRA issue 188).
Release 3.3.0
=============
Features
--------
* Facilitate `Memory` subclasses (jbellis).
* Allow multiple fields of the same type in Unions (Francis Barber).
* Add `platform.win32.Advapi32.AdjustTokenPrivileges`, `platform.win32.Advapi32.LookupPrivilegeName`, `platform.win32.Advapi32.LookupPrivilegeValue`, `platform.win32.Advapi32.ImpersonateSelf`.
* Add `platform.win32.Advapi32.DuplicateTokenEx`, `platform.win32.Advapi32.CreateProcessAsUser`, `platform.win32.Kernel32.GetExitCodeProcess`, `platform.win32.Kernel32.TerminateProcess`, `platform.win32.Kernel32.ReadFile`, `platform.win32.Kernel32.CreatePipe`, `platform.win32.Kernel32.SetHandleInformation` and related constants / structures in `platform.win32.WinBase` and `platform.win32.WinNT`. Please note that the `SECURITY_ATTRIBUTES` structure has been moved from `platform.win32.WinNT` to `platform.win32.WinBase`.
* Add `platform.win32.Kernel32.DeleteFile` and `platform.win32.Kernel32Util.deleteFile`.
* Add `platform.win32.Kernel32.GetFileAttributes` and `platform.win32.Kernel32Util.getFileAttributes`.
* Add `platform.win32.Kernel32.GetTickCount`.
* Add Win32 Service functions to `platform.win32.Advapi32`.
* Add `platform.win32.W32ServiceManager` and `W32Service`.
* Add Win32 Event Logging functions to `platform.win32.Advapi32` and `platform.win32.Advapi32Util.EventLogIterator`.
* `platform.win32.Advapi32Util.registryCreateKey` returns `true` if key was created, `false` if it already exists.
* Add `REG_BINARY`, `REG_EXPAND_SZ` and `REG_MULTI_SZ` support to `platform.win32.Advapi32Util` registry functions.
* Reduce JNI crossings in a number of native methods, moving object creation out into pure Java code.
Bug Fixes
---------
* Move all native functions into `com.sun.jna.Native`, to ensure that all dependent classes must be disposed before the `Native` class is unloaded. Note that this change is incompatible with all previous JNA native libraries.
* Fix `platform.win32.Kernel32.GetNativeSystemInfo` and `GetSystemInfo` AV on Win64.
* Fix several potential minor bugs as reported by TvT.
* Fix bug in Structure.StructureSet.toString (Blair Zajac), exposed by Tomcat ThreadLocal cleanup.
* Fix several bugs when using Structure(Pointer) ctor and array fields (Samuel Audet).
Release 3.2.7
=============
Features
--------
* Add native peer value accessors for Pointer
* The `jna.library.path` property is now re-evaluated whenever a native library is loaded. Previously this value was cached when the JNA classes loaded.
* `Native.loadLibrary` can now load `.drv` files.
* Refactor `com.sun.jna.platform.win32.WINBASE` into `WinDef`, `WinNT` and `BaseTSD`, matching Windows SDK headers.
* Refactor constants from `com.sun.jna.platform.win32.GDI32` into `WinGDI`, matching Windows SDK headers.
* Refactor constants from `com.sun.jna.platform.win32.User32` into `WinUser`, matching Windows SDK headers.
* Refactor `platform.win32.WinNT.LARGE_INTEGER` into a union.
* Add `platform.win32.ObjBase`, `com.sun.jna.platform.win32.Ole32.CoInitializeEx`, `CoUninitialize`, and `CoCreateInstance`.
* Add `platform.win32.Oleaut32.SysAllocString` and `SysFreeString`.
* Add `platform.win32.Secur32.ImpersonateSecurityContext` and `RevertSecurityContext`.
* Add `platform.win32.WinNT.WELL_KNOWN_SID_TYPE`, `SECURITY_MAX_SID_SIZE` and other related SID-related constants.
* Add `platform.win32.Advapi32.CreateWellKnownSid` and `IsWellKnownSid` and `com.sun.jna.platform.win32.Advapi32Util.isWellKnownSid`.
* Add `platform.win32.Kernel32.GetVersion`, `GetVersionEx`, `GetSystemInfo`, `GetNativeSystemInfo`, `GlobalMemoryStatusEx`, `GetLogicalDriveStrings` and `IsWow64Process`.
* Add `platform.win32.Kernel32Util.getLogicalDriveStrings`.
* Add `platform.win32.User32.GetSystemMetrics`.
* Add `platform.win32.BaseTSD.DWORD_PTR`.
* Add `platform.win32.WinBase.SYSTEM_INFO` and `MEMORYSTATUSEX`.
* Add `platform.win32.WinNT.OSVERSIONINFOEX`, `VER` constants.
* Add `platform.win32.WinDef.ULONGLONG` and `DWORDLONG`.
* Add `platform.win32.Shell32.SHGetDesktopFolder` (prep work for Com4JNA).
* Add `platform.win32.Winspool.GetPrinterInfo`.
* Add `platform.win32.WinspoolUtil.getPrinterInfo1`.
* Add `platform.win32.GDI32.GetDeviceCaps`.
* Add `platform.win32.GDI32.GetDIBits`.
Bug Fixes
---------
* Fix `ClassCastException` in `Structure.equals` (issue 152).
* Fix bug initializing a structure object from existing memory when the structure has initialized fields (issue 133).
* Fix NPE reading an array of string from a pointer when an element of the array is `NULL` (issue 151).
* Avoid calling `UnregisterNatives` in native code (issue 154).
* Compare unpacked library path against canonical (long) filename (issue 156).
* Fix `read()` of uninitialized memory in `platform.win32.Advapi32Util.getTokenGroups` and `getTokenAccount`.
* Fix `com.sun.jna.platform.win32.Secur32.QuerySecurityContextToken` to take a `CtxtHandle` instead of `PSecHandle`.
* Fix definition of BITMAPINFO (platform/win32).
Release 3.2.5
=============
Features
--------
* Split code in examples.jar into a contrib platform.jar package and individual packages for demos.
* Fix Eclipse build and added Eclipse projects for all contrib samples, import projects from jnalib and contrib.
* Ensure Structure fields correctly ordered when inherited.
* Use explicit Structure field whenever provided, regardless of whether the VM requires it.
* Add Win32 mappings for two dozen functions from Kernel32.dll, Advapi32.dll, Netapi32.dll, Secur32.dll, NtDll.dll, Ole32.dll, Shell32.dll and Crypt32.dll to com.sun.jna.platform.win32.
* Port parts of WinError.h, WinNT.h, LMAccess.h, LMCons.h, LMErr.h, LMJoin.h, NTStatus.h, ShlObj.h, WinDef.h, ShellApi.h, Wdm.h, WinReg.h, WinCrypt.h, Sspi.h, Guid.h, NtSecApi.h and DsGetDc.h.
* Add Win32 simplified utility interfaces Kernel32Util, Advapi32Util, Netapi32Util, Crypt32Util, NtDllUtil, Shell32Util, Ole32Util and Secur32Util to com.sun.jna.platform.win32.
* Support unicode paths in W32FileUtils.
* Fix exception during dispose in W32FileMonitor.
Bug Fixes
---------
* Provide String.replace for 1.4 compatibility.
* Avoid allocating memory when Structure is provided a pointer in the ctor.
* Ensure proper value returned in Pointer.getValue() for non-null, unchanged NIO Buffer values.
* Use 1.4-compatible URI generation (issue 149).
Release 3.2.4
=============
Features
--------
* Make Pointer ctor public.
* Provide access to Function objects for arbitrary Pointer values.
* Add linux/ia64 binaries (bpiwowar). See issue 134 patch.
Bug Fixes
---------
* Use a more robust method to decode a file-based URL (issue 135).
Release 3.2.3
=============
Features
--------
* Include version information in code in case package information lost.
Bug Fixes
---------
* Fix WindowUtils exception on mouse over TrayIcon.
* Fix bug toggling windows transparent/opaque (win32/OSX).
* Avoid overwriting unchanged Pointer values in arrays (function calls with Pointer[] and Structure.read).
* Ensure Structure fields marked `final` are never written.
* Fix bug preventing proper population Structure.ByReference fields on Structure read.
* Ensure double buffering is disabled in components added to a transparent window.
* Fix UnsatisfiedLinkError attempting to load system libraries under Web Start.
* Fix loading Web Start-provided libraries on OSX (libraries must have a .jnilib suffix under Web Start).
* Properly include sources in Maven zip file (Issue 129).
Release 3.2.2
=============
Features
--------
* Provide length-specified Pointer.getStringArray()
Bug Fixes
---------
* Fix crash with direct mapping if NULL struct* used (Issue 125).
* Fix case where null-valued Structure fields would get non-null values on write.
* Synch callback Structure/Structure[] arguments on callback return.
* Fix NPE when mapping an interface to the current process.
* Automatically load proper C library version from current process on Linux (avoids crashing bug on Ubuntu with libc-i686 packages active).
* Avoid scanning structure contents in Structure.toString if contents aren't actually used.
Release 3.2.1
==========
Features
--------
* Add HRESULT, LONG mapping to W32API (marc strapetz).
Bug Fixes
---------
* Fix definition of HWND_BROADCAST in W32API.
* Fix memory alignment checking (Issue 121).
* Fix Structure equals/hashCode implementation, based on current Java fields rather than strictly native memory contents. Avoid using equals/hashCode when avoiding recursive reads/writes.
Release 3.2.0
=============
Features
--------
* Handle String, Structure, Callback, Buffer, and primitive arrays in direct mappings. Handle NativeMapped and TypeMapper, with optimized paths for IntegerType and PointerType.
* Optionally throw errno/GetLastError as an exception. This is preferred to (and more efficient than) calling Native.getLastError().
* Unload/delete native library unpacked from jna.jar if Native class is garbage collected. Only install shutdown hook if using the system class loader.
* Auto-write contiguous Structure arrays when first element is written.
* Support NativeMapped[] as function arguments for interface-mapped libraries (Issue 90).
* Enable function lookup within current process on Windows.
Bug Fixes
---------
* Restrict recursive structure reads/writes by thread instead of globally. This avoids potentially missed reads/writes with concurrent access (Issue 120).
* Ensure Memory is not GC'd and freed if direct NIO buffers mapped to it are extant.
* Allow types derived from java.nio.Buffer as Structure fields.
Release 3.1.0
=============
Features
--------
* Add raw JNI mapping of static Java methods. Performance is about 10X that of traditional JNA interface mapping, although with less type conversion functionality.
* Add library option to allow passing/return of Java Objects.
* Allow handling of uncaught callback exceptions (Issue 63).
* Object oriented interface to X server (see contrib/x11)
* Make Memory class more accessible.
* Provide Structure ctor with Pointer argument (issue 102).
* Allow implicit library access to current process on linux (issue 98).
* Open all shared libraries with RTLD_GLOBAL, if applicable. This was the default behavior on OSX and changes the default behavior on linux.
* Allow NIO Buffer as Structure field (with limitations) (Issue 57)
* Add `size_t` size.
Bug Fixes
---------
* Run tests with libjsig.so, if available, which fixes some crashes when running tests on 64-bit platforms.
* Fix Issue 104.
* Fix Issue 94 (Java 1.6 update 10 regression).
* Fix Issue 51 (Java 1.6 update 10 regression).
* Fix Issue 95.
* Fix Issue 101.
* Fix Issue 111, memory leak with String-returning Callback.
* Fix missing storage of union type information (affects usage of struct/union by value as argument and return type).
* Remove non-functional Structure ctors requiring explicit size.
Release 3.0.9
=============
Bug Fixes
---------
* Fix issue 93 by only manually searching jna.library.path, then falling back to passing the mapped library name to dlopen/LoadLibrary. This fixes an issue in JRUBY where the incorrect libc.so.6 was being loaded.
Release 3.0.8
==========
Features
--------
* Auto-map Pointer[]/String[]/WString[] return values.
* Provide utility functions to convert String to primitive array.
* Add jna.library.boot.path property to define the directory that the native stub library is loaded from
Release 3.0.7
==========
Features
--------
* Improve Win32 loading of libraries with dependencies.
Bug Fixes
---------
* Fix bug reading structures with PointerType fields, introduced with Pointer field preservation fix.
Release 3.0.6
=============
Features
--------
* Allow arbitrary callback method names if only one method is defined in the class which implements Callback (colinwalters).
* Allow specification of callback type mappers by using a TYPE_MAPPER field (colinwalters).
* Allow uninitialized (null-valued) boxed primitives in Structures (colinwalters).
* Add convenience methods to set active Union field and value simultaneously (xylo).
* Augment Union read/writeField to set the active field.
* Allow Structure auto-synch across native calls to be disabled.
* Win64 support.
Bug Fixes
---------
* Avoid overwriting unchanged Structure fields of type Pointer.
* Avoid more content dragging on OSX or warn if it's too late.
* Fix UnsatisfiedLinkError using transparent window on Win2K.
* Fix memory leak with callbacks called from native threads with no Java context (johnwallace).
* Defer structure size calculation if type mapper not yet set, allowing type mapper to be set in derived constructors (colinwalters).
* Ensure structure memory is allocated in Structure.read/writeField.
Release 3.0.5
=============
Features
--------
* Allow explicit declaration of field order for VMs which have an unpredictable field order.
* Check for w32 libraries with a "lib" prefix in addition to normal lookup.
* Allow String[]/WString[] as callback argument/return value (assume NULL-terminated array).
* Add Solaris8 compatibility to sunos-sparc build (Corey Puffalt).
* Look up libraries using web start library path, if appropriate (Corey Puffalt).
* Use constants to return integer boolean values.
Bug Fixes
---------
* Properly track cursor on alpha-masked windows.
* Avoid searching /lib or /usr/lib on 64-bit Linux.
* Avoid using incorrect version of a library when both 32- and 64-bit versions are found.
* Avoid transparent window events always dragging window bug on OSX.
* Fix division by zero error calculating structure size on OSX/ppc.
* Avoid overwriting initialized NativeMapped Structure fields when calculating structure size.
* Fix NPE reading back into StringArray.
Release 3.0.4
=============
Features
--------
* Automatically write contents of Structure.ByReference fields on Structure.write().
* Use the actual parameter type in Function invocations if no parameter type information is available (whether method is missing or untyped varargs).
* Augmented X11 library mappings (xylo).
* Support read/write of NativeMapped arrays within Structure (notably NativeLong).
Bug Fixes
---------
* Fix library load error when /usr/lib32 and /usr/lib both exist (linux) (Marek Slama).
* Avoid incorrect matches against libraries named with the same prefix (e.g. libc-client.so vs libc.so) (xylo).
* Properly handle arrays of NativeMapped (e.g. NativeLong) as a Structure field (stefan endrullis).
* Ensure structure size calculated prior to setting union active type.
* XID is 64-bits on 64-bit X clients (xylo).
* Ensure proper arch name is used on Debian (amd64 instead of x86_64).
Release 3.0.3
=============
Features
--------
* Enable build/run using IBM's J9 VM (leonardo).
* Make StdCallFunctionMapper attempt a leading underscore if the simpler mapping doesn't work.
* Allow Structure.read to overwrite final fields (may not work on some 1.4 VMs).
Bug Fixes
---------
* Fix NPE when passing an array of Structure.ByReference.
* Compare entire linux library version when finding a match.
* Don't pass struct by value unless the method signature declares it.
* Restrict custom first element structure alignment to OSX/ppc.
* Improve performance and reduce memory footprint for window masks. Optimize polygon-based masks on w32. Use XFillRectangles on X11.
* Fix linkage settings on sunos-amd64 to avoid relocation errors.
* Fix callback allocation code on w32, solaris, freebsd, darwin (libffi was misconfigured).
* Fix bug when NativeMapped fields are used in a Structure.ByValue instance.
* Fix NPE calling Structure.read() before memory is initialized.
* Fix NPE calling Structure.read/write with uninitialized NativeMapped fields.
Release 3.0.2
=============
Features
--------
* Attempt to force unload of jnidispatch library prior to deleting it (w32).
* Added amd64 targets for OSX, FreeBSD, and Solaris.
Bug Fixes
---------
* Reduce space allocated for invocation arguments.
* Fix NPE when NativeMapped type is used in a Structure.
* Fix some X11 type mappings for 64-bit.
* Fix OSX Leopard/JRE1.5+ window transparency.
* Fix window alpha compositing on X11.
* Fix loading of libraries with unicode names on OSX.
Release 3.0.1
=============
Features
--------
* Improve transparent window drawing performance on w32
* Use closure allocation from libffi
Bug Fixes
---------
* Ensure nested structure arrays initialized with Structure.toArray use the appropriate native memory.
* Ensure structure size is calculated prior to converting to array
* Avoid creating new windows when setting a window mask
* Fix bug in Pointer.setChar.
Release 3.0
===========
Features
--------
* More supported platforms, via GCC's libffi (wmeissner)
* Support struct by value as parameter and return value (duncan)
* Support struct by reference within structures
* Provide access to native peer for java.awt.Component
* Provide access to native peer on OS X.
* Support MINGW32 builds (fullung)
* Allow per-field Structure read/write by field name
* Avoid writing Structure fields marked 'volatile'
* Read and wrap function pointers in Structure fields when read with a Java proxy to allow easy Java-side invocation (Ken Larson)
* Support array-backed Buffers as arguments (wmeissner)
* Auto-conversion of custom types (wmeissner)
* Allow pointer type-safety
* Optional VM crash protection, via Native.setProtected(boolean)
* Auto-convert WString[]
* Provide library synchronization wrapper similar to Collections.synchronizedX
* Support lookup of OSX framework libraries by name
* Explicit access to shared library global data
* Invocation interception to facilitate translation of C preprocessor macros and inline functions
* Provide utility to determine Web Start native library cache location; auto-include this path if jnidispatch is included as a &lt;nativelib&gt; (robertengels)
* Provide access to aligned memory
* Versioning information embedded in jna.jar and native library
Bug Fixes
---------
* Avoid attempts to free native library if it failed to load (wmeissner)
* Explicitly check method signatures for varargs instead of heuristically guessing (wmeissner)
* Disallow declaring Pointer-derived fields in Structures (Function, Memory)
* Ensure Object.toString/hashCode/equals methods are intercepted on proxyied interfaces
* Update X11 library for 64-bit use (wmeissner)
* Properly map arrays of char*/wchar_t* under w32
* Allow Pointer[] as a Structure field and Function argument
* Fix some misleading Structure error messages
* Properly preserve/return GetLastError/errno after native calls
* Allocate executable memory on w32 to avoid errors with hardware-enforced data execution protection (DEP)
* Fix VM crash on w32 stdcall callbacks
* Use long offsets and sizes rather than ints (64-bit safe)
* Properly clean up references and release closure memory on JNI_Unload
* Use simpler AWT/JAWT library loading workaround
* Avoid changing array references within a Structure on read
Release 2.5
===========
Features
--------
* Unions
* Optimized shaped windows (chris deckers & olivier chafik); instantiation time improved by about 2-3 orders of magnitude for large, mostly contiguous shapes
* Provide type mapping in callback arguments/results
* Provide access to ByteBuffer direct address as a Pointer
* Provide customization of native string encoding with jna.encoding system property
Bug Fixes
---------
* Properly handle VMs with reversed Structure member storage
* Avoid making window undecorated when clearing window mask on X11
* Fix structure alignment bug on OSX/PPC when first element is > 4 bytes in size
* Clearing OSX window mask by setting to MASK_NONE now works properly
* Avoid index exceptions if native buffers are not NUL-terminated on string conversions
* Write initialized Structure[] argument memory prior to function calls
* Fix IllegalArgumentException reading WString into a Structure
* Clear memory when allocating a structure block (fixes VM crash)
* Remove versioned JAWT dependency on OSX, allowing use on 10.3/JRE1.4.
Release 2.4
===========
Features
--------
* Explicitly support unaligned structures
* Auto-reallocate structure arrays
* Automatic handling of w32 UNICODE/ASCII variants
* Automatic mapping of decorated w32 stdcall function names
* Customizable, automatic type conversion of arguments and results (wmeissner)
* Support char*[] arguments as Java String[]
* Structure supports Callback members (wmeissner)
* getByteBuffer from Pointer/Memory (wmeissner)
* Allow GC of native libraries
* Facilitate use from non-Java contexts (JRuby et al.) (wmeissner)
* Improve library path searching (wmeissner)
* Handle Structure[] arguments
* Handle native long arguments and return values
* Handle direct and array-based ByteBuffer arguments (wmeissner)
* Change default w32 build to use GCC (it's free, yo)
Bug Fixes
---------
* Structure.toArray failed to initialize members
* Disallow explicit free of Structure/Memory
* Ensure native libraries are only loaded once until released
* Properly handle NULL when the return value is a Structure
* Proper conversion to wchar_t on linux
* Copy full length of Java strings to C strings instead of stopping when a NUL character is encountered
+504
Ver Arquivo
@@ -0,0 +1,504 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
+25
Ver Arquivo
@@ -0,0 +1,25 @@
JNA is dual-licensed under 2 alternative Open Source/Free
licenses: LGPL 2.1 and Apache License 2.0. (starting with
JNA version 4.0.0).
What this means is that one can choose either one of these
licenses (for purposes of re-distributing JNA; usually by
including it as one of jars another application or
library uses) by downloading corresponding jar file,
using it, and living happily everafter.
You may obtain a copy of the LGPL License at:
http://www.gnu.org/licenses/licenses.html
A copy is also included in the downloadable source code package
containing JNA, in file "LGPL2.1", under the same directory
as this file.
You may obtain a copy of the ASL License at:
http://www.apache.org/licenses/
A copy is also included in the downloadable source code package
containing JNA, in file "ASL2.0", under the same directory
as this file.
+12
Ver Arquivo
@@ -0,0 +1,12 @@
This copy of JNA is licensed under the
Apache (Software) License, version 2.0 ("the License").
See the License for details about distribution rights, and the
specific rights regarding derivate works.
You may obtain a copy of the License at:
http://www.apache.org/licenses/
A copy is also included in the downloadable source code package
containing JNA, in file "ASL2.0", under the same directory
as this file.
+13
Ver Arquivo
@@ -0,0 +1,13 @@
This copy of JNA is licensed under the
Lesser General Public License (LGPL), version 2.1 ("the License").
See the License for details about distribution rights, and the
specific rights regarding derivate works.
You may obtain a copy of the License at:
http://www.gnu.org/licenses/licenses.html
A copy is also included in the downloadable source code package
containing JNA, in file "LGPL2.1", under the same directory
as this file.
+33
Ver Arquivo
@@ -0,0 +1,33 @@
* RELATED and/or SIMILAR PROJECTS:
* Feel free to add notes and/or descriptions here (this should probably go
* on a wiki somewhere).
----
* nlink.dev.java.net:
pros: simple definitions (same as jna)
cons: w32 only
* sf.net/projects/jnative:
cons: boilerplate, manual code generation by calling setup methods
pros: callbacks, byref args?
* JNIWrapper: kinda like jnative (commercial), includes platform "packs"
* coroutine for Java, like jnative (commercial)
* jnieasy: c++ mappings (http://www.innowhere.com:8080/webapp/jsp/products/jnieasy/index.jsp?_page=products.jnieasy)
* j2native (www.smardec.com)
* j-interop.sf.net
* jawinproject.sf.net (COM DLL access)
* jacob-project.sf.net (COM DLL access)
* nativecall.sf.net (minimal)
* cxxwrap.sf.net
* J/Direct (defunct)
* NoodleGlue
* SWIG
* ctypes4j.sf.net
* ctypes-java (out of date)
* jnbridge
* xFunction (http://excelsior-usa.com/xfunction.html, commercial, osx)
* JACE c++ mappings
* JAW Java API wrapper http://www.aplu.ch/home/apluhome.jsp?site=5
# OTHER REFERENCES
# JNI options: http://staff.develop.com/halloway/JavaWin32.html
# List of JNI alternatives: http://weblog.janek.org/Archive/2005/07/28/AlternativestoJavaNativeI.html
+120
Ver Arquivo
@@ -0,0 +1,120 @@
![Java Native Access - JNA](https://github.com/twall/jna/raw/master/www/images/jnalogo.jpg "Java Native Access - JNA")
Java Native Access (JNA)
========================
The definitive JNA reference (including an overview and usage details) is in the [JavaDoc](http://twall.github.com/jna/4.1.0). Please read the [overview](http://twall.github.io/jna/4.1.0/overview-summary.html#overview_description). Questions, comments, or exploratory conversations should begin on the [mailing list](http://groups.google.com/group/jna-users), although you may find it easier to find answers to already-solved problems on [StackOverflow](http://stackoverflow.com/questions/tagged/jna).
JNA provides Java programs easy access to native shared libraries without writing anything but Java code - no JNI or native code is required. This functionality is comparable to Windows' Platform/Invoke and Python's ctypes.
JNA allows you to call directly into native functions using natural Java method invocation. The Java call looks just like the call does in native code. Most calls require no special handling or configuration; no boilerplate or generated code is required.
JNA uses a small JNI library stub to dynamically invoke native code. The developer uses a Java interface to describe functions and structures in the target native library. This makes it quite easy to take advantage of native platform features without incurring the high overhead of configuring and building JNI code for multiple platforms.
While significant attention has been paid to performance, correctness and ease of use take priority.
In addition, JNA includes a platform library with many native functions already mapped as well as a set of utility interfaces that simplify native access.
Projects Using JNA
==================
JNA is a mature library with dozens of contributors and hundreds of commercial and non-commercial projects that use it. If you're using JNA, feel free to [tell us about it](http://groups.google.com/group/jna-users). Include some details about your company, project name, purpose and size and tell us how you use the library.
Download
========
Version 4.1.0
* [jna.jar](https://maven.java.net/content/repositories/releases/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar)
* [jna-platform.jar](https://maven.java.net/content/repositories/releases/net/java/dev/jna/jna-platform/4.1.0/jna-platform-4.1.0.jar)
Features
========
* Automatic mapping from Java to native functions, with simple mappings for all primitive data types
* Runs on most platforms which support Java
* Automatic conversion between C and Java strings, with customizable encoding/decoding
* Structure and Union arguments/return values, by reference and by value
* Function Pointers, (callbacks from native code to Java) as arguments and/or members of a struct
* Auto-generated Java proxies for native function pointers
* By-reference (pointer-to-type) arguments
* Java array and NIO Buffer arguments (primitive types and pointers) as pointer-to-buffer
* Nested structures and arrays
* Wide (wchar_t-based) strings
* Native long support (32- or 64-bit as appropriate)
* [Demo applications/examples](https://github.com/twall/jna/tree/master/contrib)
* Supported on 1.4 or later JVMs, including JavaME (earlier VMs may work with stubbed NIO support)
* Customizable marshalling/unmarshalling (argument and return value conversions)
* Customizable mapping from Java method to native function name, and customizable invocation to simulate C preprocessor function macros
* Support for automatic Windows ASCII/UNICODE function mappings
* Varargs support
* Type-safety for native pointers
* VM crash protection (optional)
* Optimized direct mapping for high-performance applications.
* COM support for early and late binding.
* COM/Typelib java code generator.
Community and Support
=====================
All questions should be posted to the [jna-users Google group](http://groups.google.com/group/jna-users). Issues can be submitted [here on Github](https://github.com/twall/jna/issues).
When posting to the mailing list, please include the following:
* What OS/CPU/architecture you're using (e.g. Windows 7 64-bit)
* Reference to your native interface definitions (i.e. C headers), if available
* The JNA mapping you're trying to use
* VM crash logs, if any
* Example native usage, and your attempted Java usage
It's nearly impossible to indicate proper Java usage when there's no native
reference to work from.
For commercial support, please contact twalljava [at] java [dot] net.
Using the Library
=================
* [Getting Started](https://github.com/twall/jna/blob/master/www/GettingStarted.md)
* [Mapping between Java and Native](https://github.com/twall/jna/blob/master/www/Mappings.md)
* [Using Pointers and Arrays](https://github.com/twall/jna/blob/master/www/PointersAndArrays.md)
* [Using Structures and Unions](https://github.com/twall/jna/blob/master/www/StructuresAndUnions.md)
* [Using By-Reference Arguments](https://github.com/twall/jna/blob/master/www/ByRefArguments.md)
* [Customization of Type Mapping](https://github.com/twall/jna/blob/master/www/CustomMappings.md)
* [Callbacks/Function Pointers/Closures](https://github.com/twall/jna/blob/master/www/CallbacksAndClosures.md)
* [Dynamically Typed Languages (JRuby/Jython)](https://github.com/twall/jna/blob/master/www/DynamicallyTypedLanguages.md)
* [Platform Library](https://github.com/twall/jna/blob/master/www/PlatformLibrary.md)
* [Direct Method Mapping](https://github.com/twall/jna/blob/master/www/DirectMapping.md) (Optimization)
* [Frequently Asked Questions (FAQ)](https://github.com/twall/jna/blob/master/www/FrequentlyAskedQuestions.md)
* [Avoiding Crashes](http://twall.github.com/jna/4.1.0/javadoc/overview-summary.html#crash-protection)
Primary Documentation (JavaDoc)
===============================
The definitive JNA reference is in the [JavaDoc](http://twall.github.com/jna/4.1.0/).
Developers
==========
* [Contributing to JNA](https://github.com/twall/jna/blob/master/www/Contributing.md)
* [Setting up a Windows Development Environment](https://github.com/twall/jna/blob/master/www/WindowsDevelopmentEnvironment.md)
* [Setting up an Android Development Environment](https://github.com/twall/jna/blob/master/www/AndroidDevelopmentEnvironment.md)
* [Releasing JNA](https://github.com/twall/jna/blob/master/www/ReleasingJNA.md)
* [Publishing to Maven Central](https://github.com/twall/jna/blob/master/www/PublishingToMavenCentral.md)
Contributing
============
You're encouraged to contribute to JNA. Fork the code from [https://github.com/twall/jna](https://github.com/twall/jna) and submit pull requests.
For more information on setting up a development environment see [Contributing to JNA](https://github.com/twall/jna/blob/master/www/Contributing.md).
If you are interested in paid support, feel free to say so on the [jna-users mailing list](http://groups.google.com/group/jna-users). Most simple questions will be answered on the list, but more complicated work, new features or target platforms can be negotiated with any of the JNA developers (this is how several of JNA's features came into being). You may even encounter other users with the same need and be able to cost share the new development.
License
=======
This library is licensed under the LGPL, version 2.1 or later, and (from version 4.0 onward) the Apache Software License, version 2.0. Commercial license arrangements are negotiable.
*NOTE: Oracle is not sponsoring this project, even though the package name (com.sun.jna) might imply otherwise.*
+286
Ver Arquivo
@@ -0,0 +1,286 @@
# DESIGN GOALS/REQUIREMENTS
o no permanent references to java objects in native code (hard to get rid of)
this means no java object arguments to callbacks; use some sort of integer
key instead (hashcode?) callbacks can hold local data anyway...
o make simplest Java usage map to most common C usage
- additional constructs provided for less-common cases
(WString,Structure.ByValue/ByReference)
o structure is treated as a pointer, except within a struct
o primitive types are passed directly
o arrays are treated as pointers, except within a struct
- in structure (inline; otherwise pointer-to-X should be used)
- as function argument (auto-convert to pointer via Memory)
o pointer to type in struct should use PointerType or Structure.ByReference
o "free" should be invisible wherever possible
# FUTURE DEMOS:
* test keyboard keys' state (needs OSX impl)
* get system process information, basic process control
* additional file utilities (meta info, free space, etc)
* enforce window minimum/maximum size (workaround java bug)
# TODO
* annotations/generics:
o GetPrimitiveArrayCritical: use this if flagged (by annotation? method name?)
o per-arg/return type marshalling
o avoid casts in loadLibrary
o wrap global variables w/type (set/get)
o support annotations of parameters and return values w/o breaking
1.4 compatibility (retroweaver?), e.g.
-- retroweaver (requires retroweaver runtime classes to provide annotation
features) not yet worth doing
void my_function(@MarshalAs(off_t)long arg);
trading off cruft in the interface def to avoid cruft in the usage:
my_function(0) versus my_function(new off_t(0))
this only really applies to NativeLong/IntegerType types that want to use a
primitive value instead of creating an object instance.
o flag string(/wstring)-returning methods which need to free their result
to avoid leaking memory whan auto-creating strings from the result
(since normally we don't take explicit ownership of any returned pointers)
this is a special case for returned strings only, since other returned
pointers are available to the user for later "freeing"
Use a map on library creation, an iface for the library, or annotation
NOTE: how many methods actually do this? strdup...
Maybe make function return "Memory", which can then be converted to a
Structure or some other type. Then memory will free itself when no longer
referenced. (not really common)
* eliminate type conversion contexts; these are almost entirely unused and
more complicated than just wrapping a native mapping in a utility function
* direct non-primitive array arguments (String[], Pointer[], NativeMapped[])
* auto-generate direct mappings/bindings on a per-method basis (perform a
method register on first call to an interface-mapped function) with
sufficient pre-processing to convert to primitives.
* dispose memory/callbacks in Native finalizer to ensure they run first
(use referencequeue to run them when they become unreachable)
* make direct calls call back *once* to Java where conversion is required,
and process all arguments from there (instead of potentially swapping back
and forth multiple times). This also makes it easer to perform conversions
(no native changes required).
* ppc64 direct/raw failures (multiple)
* direct calls on ppc to varargs (callbacks) with FP args fail; avoid them for
now
* Callback.PostCallWrite.write() cf PostCallRead
* universal GCC build w/cross-compile (needs cross compilers...)
* return Pointer.SIZE/LONG_SIZE/WCHAR_SIZE in bits (for consistency with 1.5)
Long.SIZE, Integer.SIZE, et al.
* interface "lvalue", which can provide a pointer to itself (reference() or
addressOf())?
* bitfields for structs (how?)
# DONE
* combine direct and interface mapping calling code where possible
* DOCS: how to properly use W32API_DEFAULT_OPTIONS (A/W, String/WString)
* make native dll extraction from jar public, to use with user dlls packaged
in a jar
* use consistent cpu references (x86->i386, x86_64->amd64)
* osgi for osx
* NO: make Pointer free-able (system allocates memory, client frees it); actually,
this should probably be automatic so the user doesn't have to think about it.
Maybe a custom type representing "function-allocated-pointer" or
"pointer-requiring-free" (which is just Memory). For now, leave it up to
the user to manage the pointer, since they have to define the free method
anyway. use could always put a finalizer on a PointerType-derived type.
- user can do this explicitly if needed
* NO: use libffi java raw? (deprecated)
* NO: MethodArgument/ReturnMapper: per method mapping of arguments/return type.
Can use annotations as shorthand to initialize a map, but basically set up a
per-NativeLibrary (or per-Function?) map of methods to mappers.
Requires separate compilation of annotation handling.
* NO: packaging: 'types', 'convert/marshal' subpackages?
note: marshal/unmarshal vs to/fromnative: to/fromnative is more
explicit, since marshal/unmarshal doesn't indicate src/dst.
o moving conversion contexts to subpackage cleans up top level
substantially, but we probably don't want to move things like Structure and
Pointer into a types subpackage (which would leave just a few top-level
classes). Javadoc is cluttered by example classes anyway.
* cache structure information per-class
* fix setFieldOrder to *always* apply if used
* Make a separate jar file for all OS-specific headers
Maybe make interfaces per-header file (winbase, winnt, stdlib, etc),
aggregated per-library (interface CLibrary extends stdlib, stdio, etc)
(how useful would it really be, or is this just sorting legos?)
o same for windowutils, fileutils, etc. (not useful)
* check Structure "final" fields; should never write back to native memory
* OSX ObjC access (see rococoa)
* do Structure.write for any callback args
* pointer.setValue(), to handle NativeMapped types and move read/writeValue
methods out of Structure, to be used by Function w/NativeMapped[] parameter
* if method has "GetLastErrorException/ErrnoException" in its signature, use
result codes + GetLastError/errno/errstr to auto-generate
runtime exceptions? (cf P/Invoke; also useful for X11 return types)
provide annotation/custom invocation handler/hook to examine return value and
throw an exception if the return value indicates an error
o are error return values consistent (if so, a single handler works)?
if null -> call GetLastError
if nonzero ?
o otherwise, need an ExceptionOnZero, ExceptionOnNonZero runtime, from which
derive GetLastError/ErrnoExceptionOnZero/NZ
* verify get/set methods vs read/write for performance (Pointer)?
(see RawTest for performance comparisons)
* Allow Buffer in Structures (and callbacks) (auto-wrap in direct byte buffer)?
o this gets tricky when reading structs from native memory; we don't know if
the value is already mapped to a buffer (cf CallbackReference)
* standard types for various platforms: posix/types.h, w32 (DWORD, HANDLE)
* embed version in DLL ('depends'-done)/so (symlink?)
* use libffi closure allocation/deallocation
* ensure Library options are passed to NativeFunctionHandler
(needs getLibraryOptions(Class cls))
* handle array of Structure.ByReference as parameter/return value (cf Pointer[])
* test performance of setByte/getByte and pass pointer field directly if it
makes sense to do so (done, halves access time to use pointer field directly,
slight variations on 1.4/1.5/1.6).
* test callback arg/return value for callback type
* structure by value in callback
* call native to fix up FFIType on creation (avoid multithreading problems)
properly handle union by value (or punt; must pass union field instead)
* hash javah-generated headers; when changed, invalidate platform-specific
* add main class which spits out version information
* docs: split pages: FAQ
FAQ: J2ME, new platform builds, stdcall
* struct by reference within structure
* struct by value
(how to do struct value return (vs struct pointer) (uncommon)?)
(how to do struct value argument (vs struct pointer) (uncommon)?)
* use appropriate size_t and off_t sizes (use long offsets everywhere in
Pointer)
* Callback/function pointer as return value (e.g. signal())
* type safety between returned and passed in pointers (w32 API); advantage of
deriving from Pointer is that type mapping can be made automatic, without an
explicit type mapping defined.
* catch native crash/exception/faults and re-throw as java exception
this is mostly for debugging a new mapping to avoid crashing the VM
could do setjmp/longjmp on *nix and catch C++ exception on w32
* NativeMapped: provide interface to automatically convert custom Java
type to/from native types.
* update X11 libs for 64-bit
* use libffi from gcc to handle calls and callbacks?
or move callback asm templates into dispatch_<arch>.c
* more tests for argument types (2 args, all permutations of basic data types)
ensures native stack handling is done properly (handled by libffi)
* universal OSX build w/cross-compile (hard to do with libffi)
* use jna.encoding property to affect string encoding instead of just using
the system default encoding.
* change/augment getWindowHandle0 to provide any heavyweight component window
* unions (copy-on-call is problematic: which member is active?) must require
explicit write, either per member or whole object before export
* rename Argument/Result Converter to be fromNative/toNative
* split unit tests
* auto-convert struct pointers in callback args to Java Structure
(may need a proxy wrapper around callback to avoid excessive JNI)
use proxy for callbacks to enable auto-conversion of arguments and/or return
value (in java-land instead of C-land).
* review/use refactor nativelibrary/function
* auto-generate stdcall decorated symbols (try if undecorated lookup fails)
* per-library jna.library.path: many libraries have a "standard" location (or
several); let the library author indicate what these are (X11, for example)
* return array of struct (annotation to indicate which argument has the
length of the returned value might be nice) (this can now be done with a
type mapper)
* callbacks need a dispose if they are to live beyond the lifetime of the
function to which they are passed; maybe a simpler callback interface for
transient callbacks, and require callback+dispose for most callbacks?
TransientCallback: callback
NonTransientCallback: callback+dispose
(callback is disposed when no longer referenced; user must ensure callback
is not GC'd until it is removed as a native callback)
* auto-convert strings in w32 functions ending in 'W'? would this introduce
any ambiguity?
* Dispose/unload library on GC (use ref queue)
* fix dnd on linux (no hole?) (mostly fixed, still some artifacts)
* transparent/shaped drag image
* windows handles need to be Pointer (void*), not 'int'
* other demos: move to trash, file change notification
* tests for other primitive array types
* build test dll/dispatch lib w/cygwin/gcc instead of msvc (?) under w32
* nested struct alignment (4/8 byte? depends on first element?)
* nested structs in structs: easier to define using struct; use pointer
if you need a pointer
struct auto-converts to pointer as argument, should be inline in struct
(struct should require explicit pointer, argument should require explicit
non-pointer) (maybe use object version of basic type as "pointer" version)
* provide JNA-only search path for libraries
* callbacks
* move javah-generated files to own space
* darwin/PPC asm layer
* enable w32 build with either GCC or MSVC (GCC-built dll doesn't work yet)
* support pointer to basic type argument (int *) w/type safety - what's the
best API from a user perspective? new Pointer(int)? new Pointer<int>?
Base class "pointer to" gets converted to Pointer in invocation handler;
provide a getValue() to retrieve the result; otherwise the memory is opaque
o IntPtr, WCharPtr, CharPtr, ShortPtr, LongPtr, DoublePtr, FloatPtr,
Handle (PtrPtr), getValue(), getPointer()
o add getCharArray() et al. to Pointer?
* inline arrays of primitive types
* remove debug flags (they're not useful)
* Use WString to identify return type and arg
* use interface to identify native, instead of annotation
* isolate stdcall to w32 (should be private to platform)
* generic gcc build/osx(ppc/x86)/linux
* remove generics/enable build under 1.4
* tests for structs
* test float/double
* offset placeholders for structs (explicit alignment)
* vanilla ant build file
* build native stuff from build.xml
* implement basic junit tests
* auto-align struct fields
* handle long/byte/short
* make annotations for native method names optional
// hard clip for now, alpha transparency later
// also allow ImageIcon to be used as clip (getImage())
void setWindowMask(Window w, Shape clip);
// needs:
int findNativeWindow(Window w);
#MAYBE NOT
* should structure offsets be 64-bit? technically yes, but in practice I don't
think a structure that big actually works.
* (maybe) move all native functions into Native (limit header files, easier
management)
* Does it make sense to define Int16/UInt16, Int32/UInt32, etc? Probably not
the signed versions, but maybe the unsigned ones, to facilitate generating
unsigned values (maybe just provide utilities to pack an unsigned int into a
signed int). What about size_t, off_t, et al.? Would either need a
bunch of native lookup functions (more accurate) or java-side conditionals
(less robust but easier to change).
o bounds checking is handled by IntegerType (pass in a long, get an
exception if the value is out of bounds).
o when used as struct fields, could allow detection of field order by order
of initialization (requires all-or-nothing usage, though)
* StringBuffer/StringBuilder as mutable char*/wchar_t* argument
NOTE: byte[]/char[] is probably better; it's trivial to convert to String
and native code can't change the size anyway
* provide library load/unload hooks (Runnables in options?). Examples:
o GetLastError (no longer needed)
o WSAInit?
* determine X11 display name from current java program (if any); null is ok
since it uses getenv(DISPLAY), which is what java would do
note: DISPLAY may be available in GraphicsDevice->getIDstring
+1200
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Arquivo executável → Arquivo normal
Ver Arquivo
+8
Ver Arquivo
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/jnalib/dist/jna.jar"/>
<classpathentry kind="src" path="/platform"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+17
Ver Arquivo
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>alphamaskdemo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
+66
Ver Arquivo
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jnacontrib.alphamaskdemo" default="jar" basedir=".">
<description>Builds, tests, and runs the project jnacontrib.alphamaskdemo.</description>
<!-- Locations -->
<property name="src" location="."/>
<property name="build" location="build"/>
<property name="jna-dist" location="../../dist"/>
<property name="classes" location="${build}/classes"/>
<property name="jar" location="${build}/demo-alphamask.jar"/>
<property name="file.reference.jna.jar" location="../../build/jna.jar"/>
<property name="main-class" value="com.sun.jna.contrib.demo.AlphaMaskDemo" />
<path id="classpath">
<fileset file="${file.reference.jna.jar}"/>
<fileset dir="../platform/dist" includes="jna-platform.jar"/>
</path>
<!-- Run Demo. -->
<target name="run" depends="compile">
<java classname="${main-class}" fork="true">
<classpath>
<pathelement location="${classes}" />
<path refid="classpath"/>
</classpath>
</java>
</target>
<!-- Delete class and jar files. -->
<target name="clean">
<delete dir="${classes}"/>
<delete file="${jar}"/>
<delete dir="${build}"/>
</target>
<!-- Compile all classes. -->
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
<javac srcdir="${src}" destdir="${classes}" target="1.5" source="1.5"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
</classpath>
</javac>
</target>
<!-- Create jar-file. -->
<target name="jar" depends="compile">
<!-- Copy all non-java files to classes. -->
<copy todir="${classes}/com">
<fileset dir="${src}/com">
<exclude name="**/*.java"/>
</fileset>
</copy>
<jar jarfile="${jar}" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
<!-- platform -->
<fileset dir="../platform/build/classes/com"/>
<!-- jna -->
<zipfileset src="${file.reference.jna.jar}"/>
</jar>
</target>
</project>
@@ -1,4 +1,4 @@
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
/* Copyright (c) 2007-2008 Timothy Wall, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -10,7 +10,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.examples;
package com.sun.jna.contrib.demo;
import java.awt.BorderLayout;
import java.awt.Color;
@@ -25,6 +26,7 @@ import java.awt.Window;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.awt.image.ImageObserver;
@@ -37,6 +39,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JFrame;
@@ -51,16 +54,26 @@ import javax.swing.border.EmptyBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.MouseInputAdapter;
import com.sun.jna.Native;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import com.sun.jna.examples.unix.X11;
import com.sun.jna.examples.unix.X11.XSetWindowAttributes;
import com.sun.jna.examples.win32.GDI32;
import com.sun.jna.examples.win32.User32;
import com.sun.jna.examples.win32.GDI32.BITMAPINFO;
import com.sun.jna.examples.win32.User32.BLENDFUNCTION;
import com.sun.jna.examples.win32.User32.POINT;
import com.sun.jna.examples.win32.User32.SIZE;
import com.sun.jna.platform.WindowUtils;
import com.sun.jna.platform.unix.X11;
import com.sun.jna.platform.unix.X11.Display;
import com.sun.jna.platform.unix.X11.GC;
import com.sun.jna.platform.win32.GDI32;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinGDI;
import com.sun.jna.platform.win32.WinUser;
import com.sun.jna.platform.win32.WinDef.HBITMAP;
import com.sun.jna.platform.win32.WinDef.HDC;
import com.sun.jna.platform.win32.WinDef.HWND;
import com.sun.jna.platform.win32.WinGDI.BITMAPINFO;
import com.sun.jna.platform.win32.WinNT.HANDLE;
import com.sun.jna.platform.win32.WinUser.BLENDFUNCTION;
import com.sun.jna.platform.win32.WinDef.POINT;
import com.sun.jna.platform.win32.WinUser.SIZE;
import com.sun.jna.ptr.PointerByReference;
// TODO: put this into a reasonable API; right now this is pretty much
@@ -80,6 +93,10 @@ public class AlphaMaskDemo implements Runnable {
private float alpha = 1f;
private Image image;
private void update() {
update(false, true);
}
private void update(boolean a, boolean i) {
String os = System.getProperty("os.name");
if (os.startsWith("Windows"))
@@ -110,21 +127,18 @@ public class AlphaMaskDemo implements Runnable {
}
}
private void updateX11(boolean a, boolean i) {
private com.sun.jna.Memory buffer;
private int[] pixels;
private void updateX11(boolean a, boolean i) {
X11 x11 = X11.INSTANCE;
int win = X11.None;
Pointer dpy = x11.XOpenDisplay(null);
X11.Window win = X11.Window.None;
Display dpy = x11.XOpenDisplay(null);
try {
if (!alphaWindow.isDisplayable()) {
alphaWindow.pack();
if (System.getProperty("java.version").matches("^1\\.4\\..*"))
alphaWindow.setVisible(true);
win = (int)Native.getWindowID(alphaWindow);
XSetWindowAttributes xswa = new XSetWindowAttributes();
xswa.background_pixel = 0x0;
Pointer visual = x11.XDefaultVisual(dpy, x11.XDefaultScreen(dpy));
xswa.colormap = x11.XCreateColormap(dpy, win, visual, X11.AllocNone);
x11.XChangeWindowAttributes(dpy, win, X11.CWBackPixel|X11.CWColormap, xswa);
win = new X11.Window((int)Native.getWindowID(alphaWindow));
Window parent = alphaWindow.getOwner();
Point where = parent.getLocationOnScreen();
where.translate(parent.getWidth(), 0);
@@ -133,41 +147,61 @@ public class AlphaMaskDemo implements Runnable {
alphaWindow.setBackground(new Color(0,0,0,0));
}
else {
win = (int)Native.getWindowID(alphaWindow);
win = new X11.Window((int)Native.getWindowID(alphaWindow));
}
if (i) {
int w = image.getWidth(null);
int h = image.getHeight(null);
alphaWindow.setSize(w, h);
if (buffer == null || buffer.size() != w*h*4) {
buffer = new com.sun.jna.Memory(w*h*4);
pixels = new int[w*h];
}
BufferedImage buf = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB_PRE);
Graphics g = buf.getGraphics();
g.drawImage(image, 0, 0, w, h, null);
Pointer gc = x11.XCreateGC(dpy, win, 0, null);
int pixmap = x11.XCreatePixmap(dpy, win, w, h, 32);
long start = System.currentTimeMillis();
long blitTime, putImageTime, write;
GC gc = x11.XCreateGC(dpy, win, new NativeLong(0), null);
long gcTime = System.currentTimeMillis();
try {
x11.XSetForeground(dpy, gc, 0);
x11.XFillRectangle(dpy, pixmap, gc, 0, 0, w, h);
Raster raster = buf.getData();
int[] pixel = new int[4];
for (int y=0;y < h;y++) {
for (int x=0;x < w;x++) {
raster.getPixel(x, h-y-1, pixel);
raster.getPixel(x, y, pixel);
int alpha = (pixel[3]&0xFF)<<24;
int red = (pixel[2]&0xFF);
int green = (pixel[1]&0xFF)<<8;
int blue = (pixel[0]&0xFF)<<16;
x11.XSetForeground(dpy, gc, alpha|red|green|blue);
x11.XFillRectangle(dpy, pixmap, gc, x, h-y-1, 1, 1);
pixels[y*w+x] = alpha|red|green|blue;
}
}
x11.XCopyArea(dpy, pixmap, win, gc, 0, 0, w, h, 0, 0);
blitTime = System.currentTimeMillis();
X11.XWindowAttributes xwa = new X11.XWindowAttributes();
x11.XGetWindowAttributes(dpy, win, xwa);
X11.XImage image = x11.XCreateImage(dpy, xwa.visual,
32, X11.ZPixmap,
0, buffer, w, h, 32, w*4);
buffer.write(0, pixels, 0, pixels.length);
write = System.currentTimeMillis();
x11.XPutImage(dpy, win, gc, image, 0,0,0,0,w,h);
x11.XFree(image.getPointer());
putImageTime = System.currentTimeMillis();
}
finally {
if (gc != null)
x11.XFreeGC(dpy, gc);
}
long end = System.currentTimeMillis();
//System.out.println("gc: " + (gcTime-start) + "ms");
//System.out.println("blit: " + (blitTime-gcTime) + "ms");
//System.out.println("write: " + (write-blitTime) + "ms");
//System.out.println("put image: " + (putImageTime-write) + "ms");
//System.out.println("total: " + (end-start) + "ms");
}
}
finally {
@@ -183,34 +217,40 @@ public class AlphaMaskDemo implements Runnable {
update(true, true);
}
}
private HWND getHwnd(Window w) {
HWND hwnd = new HWND();
hwnd.setPointer(Native.getWindowPointer(w));
return hwnd;
}
private void updateW32(boolean a, boolean i) {
User32 user = User32.INSTANCE;
GDI32 gdi = GDI32.INSTANCE;
Pointer hWnd = null;
HWND hWnd = null;
if (!alphaWindow.isDisplayable()) {
alphaWindow.pack();
hWnd = Native.getWindowPointer(alphaWindow);
int flags = user.GetWindowLong(hWnd, User32.GWL_EXSTYLE);
flags |= User32.WS_EX_LAYERED;
user.SetWindowLong(hWnd, User32.GWL_EXSTYLE, flags);
hWnd = getHwnd(alphaWindow);
int flags = user.GetWindowLong(hWnd, WinUser.GWL_EXSTYLE);
flags |= WinUser.WS_EX_LAYERED;
user.SetWindowLong(hWnd, WinUser.GWL_EXSTYLE, flags);
Window parent = alphaWindow.getOwner();
Point where = parent.getLocationOnScreen();
where.translate(parent.getWidth(), 0);
alphaWindow.setLocation(where);
}
else {
hWnd = Native.getWindowPointer(alphaWindow);
hWnd = getHwnd(alphaWindow);
}
if (i) {
int w = image.getWidth(null);
int h = image.getHeight(null);
Pointer screenDC = user.GetDC(null);
Pointer memDC = gdi.CreateCompatibleDC(screenDC);
Pointer hBitmap = null;
Pointer oldBitmap = null;
HDC screenDC = user.GetDC(null);
HDC memDC = gdi.CreateCompatibleDC(screenDC);
HBITMAP hBitmap = null;
HANDLE oldBitmap = null;
try {
BufferedImage buf = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB_PRE);
@@ -222,11 +262,11 @@ public class AlphaMaskDemo implements Runnable {
bmi.bmiHeader.biHeight = h;
bmi.bmiHeader.biPlanes = 1;
bmi.bmiHeader.biBitCount = 32;
bmi.bmiHeader.biCompression = GDI32.BI_RGB;
bmi.bmiHeader.biCompression = WinGDI.BI_RGB;
bmi.bmiHeader.biSizeImage = w * h * 4;
PointerByReference ppbits = new PointerByReference();
hBitmap = gdi.CreateDIBSection(memDC, bmi, GDI32.DIB_RGB_COLORS,
hBitmap = gdi.CreateDIBSection(memDC, bmi, WinGDI.DIB_RGB_COLORS,
ppbits, null, 0);
oldBitmap = gdi.SelectObject(memDC, hBitmap);
Pointer pbits = ppbits.getValue();
@@ -255,9 +295,9 @@ public class AlphaMaskDemo implements Runnable {
POINT srcLoc = new POINT();
BLENDFUNCTION blend = new BLENDFUNCTION();
blend.SourceConstantAlpha = (byte)(alpha * 255);
blend.AlphaFormat = User32.AC_SRC_ALPHA;
blend.AlphaFormat = WinUser.AC_SRC_ALPHA;
user.UpdateLayeredWindow(hWnd, screenDC, loc, size, memDC, srcLoc,
0, blend, User32.ULW_ALPHA);
0, blend, WinUser.ULW_ALPHA);
}
finally {
user.ReleaseDC(null, screenDC);
@@ -271,9 +311,9 @@ public class AlphaMaskDemo implements Runnable {
else if (a) {
BLENDFUNCTION blend = new BLENDFUNCTION();
blend.SourceConstantAlpha = (byte)(alpha * 255);
blend.AlphaFormat = User32.AC_SRC_ALPHA;
blend.AlphaFormat = WinUser.AC_SRC_ALPHA;
user.UpdateLayeredWindow(hWnd, null, null, null, null, null,
0, blend, User32.ULW_ALPHA);
0, blend, WinUser.ULW_ALPHA);
}
if (!alphaWindow.isVisible()) {
@@ -348,8 +388,9 @@ public class AlphaMaskDemo implements Runnable {
JPanel p = new JPanel(new BorderLayout(8, 8));
p.setBorder(new EmptyBorder(8, 8, 8, 8));
p.setTransferHandler(new TransferHandler() {
private static final long serialVersionUID = 1L;
public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) {
List list = Arrays.asList(transferFlavors);
List<DataFlavor> list = Arrays.asList(transferFlavors);
if (list.contains(URL_FLAVOR)
|| list.contains(URI_LIST_FLAVOR)
|| list.contains(DataFlavor.imageFlavor)
@@ -386,8 +427,8 @@ public class AlphaMaskDemo implements Runnable {
return true;
}
if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)){
List files = (List)t.getTransferData(DataFlavor.javaFileListFlavor);
File f = (File)files.get(0);
List<File> files = (List<File>) t.getTransferData(DataFlavor.javaFileListFlavor);
File f = files.get(0);
URL url = new URL("file://" + f.toURI().toURL().getPath());
Image image = Toolkit.getDefaultToolkit().getImage(url);
setImage(image);
@@ -397,7 +438,7 @@ public class AlphaMaskDemo implements Runnable {
if (flavor != null) {
Reader reader = flavor.getReaderForText(t);
char[] buf = new char[512];
StringBuffer b = new StringBuffer();
StringBuilder b = new StringBuilder();
int count;
// excise excess NUL characters (bug in firefox, java
// or my code, not sure which). someone got the
@@ -454,6 +495,11 @@ public class AlphaMaskDemo implements Runnable {
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
centerOnScreen(frame);
frame.setVisible(true);
p.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
update();
}
});
try {
URL url = getClass().getResource("tardis.png");
@@ -23,11 +23,8 @@
<property name="jna.library.path" value="/usr/X11R6/lib:/usr/lib32:/usr/lib"/>
<nativelib href="linux-i386.jar"/>
</resources>
<resources os="Mac" arch="i386">
<nativelib href="darwin-i386.jar"/>
</resources>
<resources os="Mac" arch="ppc">
<nativelib href="darwin-ppc.jar"/>
<resources os="Mac">
<nativelib href="darwin.jar"/>
</resources>
<application-desc main-class="com.sun.jna.examples.AlphaMaskDemo"/>
<security>
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007 Timothy Wall, All Rights Reserved This library is
* Copyright (c) 2007-2008 Timothy Wall, All Rights Reserved This library is
* free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the
* Free Software Foundation; either version 2.1 of the License, or (at
@@ -8,9 +8,10 @@
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU Lesser General Public License for more details.
*/
package com.sun.jna.examples;
package com.sun.jna.contrib.demo;
import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsEnvironment;
import java.awt.Image;
@@ -33,6 +34,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComponent;
@@ -50,16 +52,13 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.MouseInputAdapter;
// TODO: put this into a reasonable API; right now this is pretty much
// just hard-coded blitting of an image into a window
// Thanks to Rui Lopes for the C# example on which this is based:
// rui@ruilopes.com
// http://www.codeproject.com/cs/media/perpxalpha_sharp.asp?df=100&forumid=3270&exp=0&select=773155
import com.sun.jna.platform.WindowUtils;
public class AlphaMaskDemo2 implements Runnable {
private static final DataFlavor URL_FLAVOR = new DataFlavor("application/x-java-url; class=java.net.URL",
"URL");
private static final DataFlavor URI_LIST_FLAVOR = new DataFlavor("text/uri-list; class=java.lang.String",
"URI list");
private static final DataFlavor URL_FLAVOR =
new DataFlavor("application/x-java-url; class=java.net.URL", "URL");
private static final DataFlavor URI_LIST_FLAVOR =
new DataFlavor("text/uri-list; class=java.lang.String", "URI list");
private JFrame frame;
private JWindow alphaWindow;
private JLabel icon;
@@ -106,6 +105,7 @@ public class AlphaMaskDemo2 implements Runnable {
frame = new JFrame("Alpha Mask Demo");
alphaWindow = new JWindow(frame, gconfig);
icon = new JLabel();
icon.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
alphaWindow.getContentPane().add(icon);
JButton quit = new JButton("Quit");
JLabel label = new JLabel("Drag this window by its image");
@@ -145,9 +145,10 @@ public class AlphaMaskDemo2 implements Runnable {
JPanel p = new JPanel(new BorderLayout(8, 8));
p.setBorder(new EmptyBorder(8, 8, 8, 8));
p.setTransferHandler(new TransferHandler() {
public boolean canImport(JComponent comp,
private static final long serialVersionUID = 1L;
public boolean canImport(JComponent comp,
DataFlavor[] transferFlavors) {
List list = Arrays.asList(transferFlavors);
List<DataFlavor> list = Arrays.asList(transferFlavors);
if (list.contains(URL_FLAVOR) || list.contains(URI_LIST_FLAVOR)
|| list.contains(DataFlavor.imageFlavor)
|| list.contains(DataFlavor.javaFileListFlavor)) {
@@ -185,9 +186,8 @@ public class AlphaMaskDemo2 implements Runnable {
return true;
}
if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
List files = (List)t
.getTransferData(DataFlavor.javaFileListFlavor);
File f = (File)files.get(0);
List<File> files = (List<File>) t.getTransferData(DataFlavor.javaFileListFlavor);
File f = files.get(0);
URL url = new URL("file://"
+ f.toURI().toURL().getPath());
Image image = Toolkit.getDefaultToolkit().getImage(url);
@@ -200,7 +200,7 @@ public class AlphaMaskDemo2 implements Runnable {
if (flavor != null) {
Reader reader = flavor.getReaderForText(t);
char[] buf = new char[512];
StringBuffer b = new StringBuffer();
StringBuilder b = new StringBuilder();
int count;
// excise excess NUL characters (bug in firefox,
// java
@@ -251,6 +251,7 @@ public class AlphaMaskDemo2 implements Runnable {
"<html><center>Drop an image with an alpha channel onto this window<br>"
+ "You may also adjust the overall transparency with the slider</center></html>"),
BorderLayout.NORTH);
p.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
final JSlider slider = new JSlider(0, 255, 255);
slider.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {

Antes

Largura:  |  Altura:  |  Tamanho: 18 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 18 KiB

+7
Ver Arquivo
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/platform"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+17
Ver Arquivo
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>balloonmanagerdemo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
+68
Ver Arquivo
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jnacontrib.balloonmanagerdemo" default="jar" basedir=".">
<description>Builds, tests, and runs the project jnacontrib.balloonmanagerdemo.</description>
<!-- Locations -->
<property name="src" location="."/>
<property name="build" location="build"/>
<property name="jna-dist" location="../../dist"/>
<property name="classes" location="${build}/classes"/>
<property name="jar" location="${build}/demo-balloonmanager.jar"/>
<property name="file.reference.jna.jar" location="../../build/jna.jar"/>
<property name="main-class" value="com.sun.jna.contrib.demo.BalloonManagerDemo" />
<path id="classpath">
<fileset file="${file.reference.jna.jar}"/>
<fileset dir="../platform/dist" includes="jna-platform.jar"/>
</path>
<!-- Run Demo. -->
<target name="run" depends="compile">
<java classname="${main-class}" fork="true">
<classpath>
<pathelement location="${classes}" />
<path refid="classpath"/>
</classpath>
</java>
</target>
<!-- Delete class and jar files. -->
<target name="clean">
<delete dir="${classes}"/>
<delete file="${jar}"/>
<delete dir="${build}"/>
</target>
<!-- Compile all classes. -->
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
<javac srcdir="${src}" destdir="${classes}" target="1.5" source="1.5"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
</classpath>
</javac>
</target>
<!-- Create jar-file. -->
<target name="jar" depends="compile">
<!-- Copy all non-java files to classes. -->
<copy todir="${classes}/com">
<fileset dir="${src}/com">
<exclude name="**/*.java"/>
</fileset>
</copy>
<jar jarfile="${jar}" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
<!-- platform -->
<fileset dir="../platform/build/classes/com"/>
<!-- jna -->
<zipfileset src="${file.reference.jna.jar}"/>
</jar>
</target>
</project>
@@ -10,7 +10,7 @@
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for
* more details.
*/
package com.sun.jna.examples;
package com.sun.jna.contrib.demo;
import java.awt.BorderLayout;
import java.awt.Color;
@@ -31,11 +31,14 @@ import java.awt.geom.AffineTransform;
import java.awt.geom.Area;
import java.awt.geom.GeneralPath;
import java.awt.geom.RoundRectangle2D;
import javax.swing.Box;
import javax.swing.JWindow;
import javax.swing.Popup;
import javax.swing.SwingUtilities;
import com.sun.jna.platform.WindowUtils;
/**
* Provides a popup balloon containing an arbitrary component. This provides
* a form of content-specific decoration less transient than a tooltip, and less
@@ -48,14 +51,13 @@ import javax.swing.SwingUtilities;
// TODO: lightweight popups
public class BalloonManager {
// Mac does it's own shadows (as does vista and some x11+xcompmgr)
// Avoid using drop shadow in some instances
private static boolean useDropShadow() {
return WindowUtils.isWindowAlphaSupported()
&& !System.getProperty("os.name").startsWith("Mac");
return WindowUtils.isWindowAlphaSupported();
}
private static class DropShadow extends JWindow {
private static final long serialVersionUID = 1L;
private static final float SHADOW_ALPHA = .25f;
private static final float YSCALE = .80f;
private static final double ANGLE = 2*Math.PI/24;
@@ -114,6 +116,9 @@ public class BalloonManager {
public void paint(Graphics graphics) {
Graphics2D g = (Graphics2D)graphics.create();
// Workaround for OSX since we only get automatic clipping
// on the content pane and below
g.setClip(getMask());
g.setPaint(new GradientPaint(0, getHeight()/2, new Color(0,0,0,0), getWidth(), getHeight()/2, new Color(0,0,0,255)));
g.fillRect(0, 0, getWidth(), getHeight());
g.dispose();
@@ -145,8 +150,9 @@ public class BalloonManager {
}
private static final class BubbleWindow extends JWindow {
private final int Y_OFFSET = 50;
private final int ARC = 25;
private static final long serialVersionUID = 1L;
private static final int Y_OFFSET = 50;
private static final int ARC = 25;
private Point offset;
private Area mask;
@@ -10,7 +10,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.examples;
package com.sun.jna.contrib.demo;
import java.awt.BasicStroke;
import java.awt.Color;
@@ -24,6 +24,7 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.geom.Rectangle2D;
import javax.swing.Icon;
import javax.swing.JFrame;
import javax.swing.JLabel;
@@ -35,6 +36,8 @@ import javax.swing.SwingConstants;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import com.sun.jna.platform.WindowUtils;
/** Demonstration of BalloonManager. */
public class BalloonManagerDemo {
private static final int ICON_SIZE = 48;
@@ -113,8 +116,7 @@ public class BalloonManagerDemo {
catch(UnsatisfiedLinkError e) {
e.printStackTrace();
String msg = e.getMessage()
+ "\nError loading the JNA library after looking in "
+ System.getProperty("jna.library.path");
+ "\nError loading the JNA library";
JTextArea area = new JTextArea(msg);
area.setOpaque(false);
area.setFont(UIManager.getFont("Label.font"));
+7
Ver Arquivo
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/platform"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+17
Ver Arquivo
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>balloontips</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
+2
Ver Arquivo
@@ -1,3 +1,5 @@
An implementation of balloon tips.
Compile the two classes in this directory. Requires Java 1.5+.
javac -cp examples.jar *.java
+68
Ver Arquivo
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jnacontrib.balloontipsdemo" default="jar" basedir=".">
<description>Builds, tests, and runs the project jnacontrib.balloontipsdemo.</description>
<!-- Locations -->
<property name="src" location="."/>
<property name="build" location="build"/>
<property name="jna-dist" location="../../dist"/>
<property name="classes" location="${build}/classes"/>
<property name="jar" location="${build}/demo-balloontips.jar"/>
<property name="file.reference.jna.jar" location="../../build/jna.jar"/>
<property name="main-class" value="com.sun.jna.contrib.demo.FilteredTextField" />
<path id="classpath">
<fileset file="${file.reference.jna.jar}"/>
<fileset dir="../platform/dist" includes="jna-platform.jar"/>
</path>
<!-- Run Demo. -->
<target name="run" depends="compile">
<java classname="${main-class}" fork="true">
<classpath>
<pathelement location="${classes}" />
<path refid="classpath"/>
</classpath>
</java>
</target>
<!-- Delete class and jar files. -->
<target name="clean">
<delete dir="${classes}"/>
<delete file="${jar}"/>
<delete dir="${build}"/>
</target>
<!-- Compile all classes. -->
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
<javac srcdir="${src}" destdir="${classes}" target="1.5" source="1.5"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
</classpath>
</javac>
</target>
<!-- Create jar-file. -->
<target name="jar" depends="compile">
<!-- Copy all non-java files to classes. -->
<copy todir="${classes}/com">
<fileset dir="${src}/com">
<exclude name="**/*.java"/>
</fileset>
</copy>
<jar jarfile="${jar}" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
<!-- platform -->
<fileset dir="../platform/build/classes/com"/>
<!-- jna -->
<zipfileset src="${file.reference.jna.jar}"/>
</jar>
</target>
</project>
@@ -1,422 +1,424 @@
//package bms.ui.widgets;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.util.ArrayList;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.Popup;
import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import javax.swing.text.PlainDocument;
//TODO: FilteredTextField - Comment this class.
/**
* The FilteredTextField class is a JTextField that only allows specified
* characters to be entered into it. The allowed characters can be added to
* the text field, and entry validation is performed as each character is
* typed. In addition, complete string validation is tested against a
* configurable regular expression when leaving the field. If the string is
* invalid the text field is bordered with a red line, and the user is notified
* of the error upon returning to the text field. The text field can also be
* configured to accept a limited number of characters.
*/
@SuppressWarnings("serial")
public class FilteredTextField extends JTextField {
public static final Character[] UPPERCASE_CHARS = {'A', 'B', 'C', 'D', 'E',
'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z'};
public static final Character[] LOWERCASE_CHARS = {'a', 'b', 'c', 'd', 'e',
'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y', 'z'};
public static final Character[] NUMERIC_CHARS = {'1', '2', '3', '4', '5',
'6', '7', '8', '9', '0'};
private static final Integer ENTRY_BALLOON = 0;
private static final Integer VALID_BALLOON = 1;
private static final Integer LENGTH_BALLOON = 2;
private static final Border RED_BORDER =
BorderFactory.createLineBorder(Color.RED, 2);
private ArrayList<Character> allowable = new ArrayList<Character>();
private int maximumLength = String.valueOf(Long.MAX_VALUE).length();
private Border defaultBorder = null;
private boolean isValid = true;
private Popup balloon = null;
private String entryError = null;
private String validRegex = null;
private String validError = null;
private Color balloonBorderColor = null;
private Color balloonBackgroundColor = null;
private Color balloonTextColor = null;
private Integer balloonDuration = null;
private Integer balloonType = null;
/**
* Create a FilteredTextField.
*/
public FilteredTextField () {
super();
init();
}
/**
* Create a FilteredTextField.
* @param columns the number of columns to use to calculate the preferred
* width
*/
public FilteredTextField (int columns) {
super(columns);
init();
}
/*
* Initialize the FilteredTextField.
*/
private void init () {
defaultBorder = getBorder();
entryError = "";
validRegex = "";
validError = "";
balloonBorderColor = BalloonTipManager.DEFAULT_BORDER_COLOR;
balloonBackgroundColor = BalloonTipManager.DEFAULT_BACKGROUND_COLOR;
balloonTextColor = BalloonTipManager.DEFAULT_TEXT_COLOR;
balloonDuration = 10000;
balloonType = ENTRY_BALLOON;
addFocusListener(new ValidationEar());
}
/**
* Sets the allowable character used for entry validation.
* @param characters the allowable characters
*/
public void setCharacters (Character[] characters) {
clearCharacters();
for (int i = 0; i < characters.length; i++) {
addCharacter(characters[i]);
}
}
/**
* Adds the character array to the list used for entry validation.
* @param characters the character array
*/
public void addCharacters (Character[] characters) {
for (int i = 0; i < characters.length; i++) {
addCharacter(characters[i]);
}
}
/**
* Adds the character to the list used for entry validation.
* @param characters the character
*/
public void addCharacter (Character character) {
if (!allowable.contains(character)) {
allowable.add(character);
}
}
/**
* Clears the list of allowable characters for entry validation.
*/
public void clearCharacters () {
allowable.clear();
}
/**
* Removes the character array from the list used for entry validation.
* @param characters the character array
*/
public void removeCharacters (Character[] characters) {
for (int i = 0; i < characters.length; i++) {
removeCharacter(characters[i]);
}
}
/**
* Removes the character from the list used for entry validation.
* @param character the character
*/
public void removeCharacter (Character character) {
if (allowable.contains(character)) {
allowable.remove(character);
}
}
/**
* Sets the maximum number of characters for the length of the entry string.
* @param maximumLength the number of characters
*/
public void setMaximumLength (int maximumLength) {
this.maximumLength = maximumLength;
}
/**
* Sets the message that is displayed when there is an entry error.
* @param entryError the entry error message
*/
public void setEntryError (String entryError) {
this.entryError = entryError;
}
/**
* Sets the regular expression that is used for string validation. String
* validation is checked when exiting the text field.
* @param validRegex the validation regular expression
*/
public void setValidRegex (String validRegex) {
this.validRegex = validRegex;
}
/**
* Sets the message that is displayed when there is a validation error.
* @param validError the validation error message
*/
public void setValidError (String validError) {
this.validError = validError;
}
/**
* Sets the color to use for the balloon border.
* @param borderColor the balloon border color
*/
public void setBalloonBorderColor (Color borderColor) {
balloonBorderColor = borderColor;
}
/**
* Sets the color to use for the balloon background.
* @param backgroundColor the balloon background color
*/
public void setBalloonBackgroundColor (Color backgroundColor) {
balloonBackgroundColor = backgroundColor;
}
/**
* Sets the color to use for the balloon text.
* @param textColor the balloon text color
*/
public void setBalloonTextColor (Color textColor) {
balloonTextColor = textColor;
}
/**
* Sets the time in milliseconds that the balloon is visible before
* disappearing. This is the maximum time that the balloon will be visible,
* as other events can also make the balloon disappear.
* @param duration the time in milliseconds
*/
public void setBalloonDuration (Integer duration) {
balloonDuration = duration;
}
/*
* (non-Javadoc)
* @see javax.swing.JTextField#createDefaultModel()
*/
protected Document createDefaultModel () {
return new FilteredTextFieldDocument();
}
/*
* This class defines the document used for the FilteredTextField.
*/
private class FilteredTextFieldDocument extends PlainDocument {
/*
* Create a FilteredTextFieldDocument.
*/
public FilteredTextFieldDocument () {
addDocumentListener(new FilteredTextFieldEar());
}
/*
* (non-Javadoc)
* @see javax.swing.text.PlainDocument#insertString(
* int, java.lang.String, javax.swing.text.AttributeSet)
*/
public void insertString (int offset, String str, AttributeSet a)
throws BadLocationException
{
if (balloon != null && BalloonTipManager.isShowing()) {
if (balloonType == VALID_BALLOON) {
balloon.hide();
}
}
StringBuffer buffer =
new StringBuffer(FilteredTextField.this.getText());
if (offset >= 0 && offset <= buffer.length()) {
buffer.insert(offset, str);
String strBuf = buffer.toString();
if (buffer.length() > maximumLength) {
if (balloon != null && BalloonTipManager.isShowing()) {
if (balloonType == LENGTH_BALLOON) {
BalloonTipManager.restartTimer();
return;
}
else {
balloon.hide();
}
}
balloon = BalloonTipManager.getBalloonTip(FilteredTextField.this,
"The number of characters must be less than or equal to " +
maximumLength, 0, 0, balloonDuration, balloonBorderColor,
balloonBackgroundColor, balloonTextColor);
balloon.show();
balloonType = LENGTH_BALLOON;
return;
}
if (strBuf == null || strBuf.equals("")) {
remove(0, getLength());
super.insertString(0, "", null);
if (balloon != null && BalloonTipManager.isShowing()) {
balloon.hide();
}
return;
}
if (allowable.contains(str.charAt(0))) {
super.insertString(offset, str, a);
if (balloon != null && BalloonTipManager.isShowing()) {
balloon.hide();
}
}
else {
if (balloon != null && BalloonTipManager.isShowing()) {
if (balloonType == ENTRY_BALLOON) {
BalloonTipManager.restartTimer();
return;
}
else {
balloon.hide();
}
}
balloon = BalloonTipManager.getBalloonTip(FilteredTextField.this,
entryError, 0, 0, balloonDuration, balloonBorderColor,
balloonBackgroundColor, balloonTextColor);
balloon.show();
balloonType = ENTRY_BALLOON;
}
}
}
/*
* This listener class is needed to catch character removal events.
*/
private class FilteredTextFieldEar implements DocumentListener {
/*
* (non-Javadoc)
* @see javax.swing.event.DocumentListener#insertUpdate(
* javax.swing.event.DocumentEvent)
*/
public void insertUpdate (DocumentEvent e) {/* N/A */}
/*
* (non-Javadoc)
* @see javax.swing.event.DocumentListener#removeUpdate(
* javax.swing.event.DocumentEvent)
*/
public void removeUpdate (DocumentEvent e) {
if (balloon != null && BalloonTipManager.isShowing())
{
balloon.hide();
}
}
/*
* (non-Javadoc)
* @see javax.swing.event.DocumentListener#changedUpdate(
* javax.swing.event.DocumentEvent)
*/
public void changedUpdate (DocumentEvent e) {/* N/A */}
}
}
/*
* This listener class is used to determine whether the string is valid based
* on a regular expression. The validation is tested when leaving the text
* field, and notification is performed when returning to the text field.
*/
private class ValidationEar extends FocusAdapter {
/*
* (non-Javadoc)
* @see java.awt.event.FocusAdapter#focusLost(java.awt.event.FocusEvent)
*/
public void focusLost (FocusEvent e) {
String entered = getText().trim();
if (!entered.matches(validRegex)) {
if (balloon != null) {
balloon.hide();
}
setBorder(
BorderFactory.createCompoundBorder(RED_BORDER, defaultBorder));
isValid = false;
}
else {
setBorder(defaultBorder);
isValid = true;
}
}
/*
* (non-Javadoc)
* @see java.awt.event.FocusAdapter#focusGained(java.awt.event.FocusEvent)
*/
public void focusGained (FocusEvent e) {
if (!isValid) {
balloon = BalloonTipManager.getBalloonTip(FilteredTextField.this,
validError, 0, 0, balloonDuration, balloonBorderColor,
balloonBackgroundColor, balloonTextColor);
balloon.show();
balloonType = VALID_BALLOON;
}
}
}
/*
* A main entry point to test the FilteredTextField.
* @param args application arguments
*/
public static void main (String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception e) {
e.printStackTrace();
}
JFrame jframe = new JFrame("FilteredTextField Test");
jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jframe.setSize(400, 75);
jframe.setLocation(400, 400);
JPanel jpanel = new JPanel();
jpanel.setLayout(new BorderLayout());
FilteredTextField ftfield = new FilteredTextField(10);
ftfield.setCharacters(LOWERCASE_CHARS);
ftfield.addCharacter('-');
ftfield.addCharacter('_');
ftfield.addCharacter(' ');
ftfield.setMaximumLength(10);
ftfield.setEntryError(
"Only lower case letters, hyphens, underscores, and spaces allowed.");
ftfield.setValidRegex("^a+[a-z-_ ]*");
ftfield.setValidError("The string must begin with the letter 'a'.");
jpanel.add(ftfield, BorderLayout.CENTER);
jpanel.add(new FilteredTextField(10), BorderLayout.SOUTH);
jframe.getContentPane().add(jpanel);
jframe.setVisible(true);
}
}
package com.sun.jna.contrib.demo;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.util.ArrayList;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.Popup;
import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import javax.swing.text.PlainDocument;
//TODO: FilteredTextField - Comment this class.
/**
* The FilteredTextField class is a JTextField that only allows specified
* characters to be entered into it. The allowed characters can be added to
* the text field, and entry validation is performed as each character is
* typed. In addition, complete string validation is tested against a
* configurable regular expression when leaving the field. If the string is
* invalid the text field is bordered with a red line, and the user is notified
* of the error upon returning to the text field. The text field can also be
* configured to accept a limited number of characters.
*/
@SuppressWarnings("serial")
public class FilteredTextField extends JTextField {
public static final Character[] UPPERCASE_CHARS = {'A', 'B', 'C', 'D', 'E',
'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z'};
public static final Character[] LOWERCASE_CHARS = {'a', 'b', 'c', 'd', 'e',
'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y', 'z'};
public static final Character[] NUMERIC_CHARS = {'1', '2', '3', '4', '5',
'6', '7', '8', '9', '0'};
private static final Integer ENTRY_BALLOON = 0;
private static final Integer VALID_BALLOON = 1;
private static final Integer LENGTH_BALLOON = 2;
private static final Border RED_BORDER =
BorderFactory.createLineBorder(Color.RED, 2);
private ArrayList<Character> allowable = new ArrayList<Character>();
private int maximumLength = String.valueOf(Long.MAX_VALUE).length();
private Border defaultBorder = null;
private boolean isValid = true;
private Popup balloon = null;
private String entryError = null;
private String validRegex = null;
private String validError = null;
private Color balloonBorderColor = null;
private Color balloonBackgroundColor = null;
private Color balloonTextColor = null;
private Integer balloonDuration = null;
private Integer balloonType = null;
/**
* Create a FilteredTextField.
*/
public FilteredTextField () {
super();
init();
}
/**
* Create a FilteredTextField.
* @param columns the number of columns to use to calculate the preferred
* width
*/
public FilteredTextField (int columns) {
super(columns);
init();
}
/*
* Initialize the FilteredTextField.
*/
private void init () {
defaultBorder = getBorder();
entryError = "";
validRegex = "";
validError = "";
balloonBorderColor = BalloonTipManager.DEFAULT_BORDER_COLOR;
balloonBackgroundColor = BalloonTipManager.DEFAULT_BACKGROUND_COLOR;
balloonTextColor = BalloonTipManager.DEFAULT_TEXT_COLOR;
balloonDuration = 10000;
balloonType = ENTRY_BALLOON;
addFocusListener(new ValidationEar());
}
/**
* Sets the allowable character used for entry validation.
* @param characters the allowable characters
*/
public void setCharacters (Character[] characters) {
clearCharacters();
for (int i = 0; i < characters.length; i++) {
addCharacter(characters[i]);
}
}
/**
* Adds the character array to the list used for entry validation.
* @param characters the character array
*/
public void addCharacters (Character[] characters) {
for (int i = 0; i < characters.length; i++) {
addCharacter(characters[i]);
}
}
/**
* Adds the character to the list used for entry validation.
* @param characters the character
*/
public void addCharacter (Character character) {
if (!allowable.contains(character)) {
allowable.add(character);
}
}
/**
* Clears the list of allowable characters for entry validation.
*/
public void clearCharacters () {
allowable.clear();
}
/**
* Removes the character array from the list used for entry validation.
* @param characters the character array
*/
public void removeCharacters (Character[] characters) {
for (int i = 0; i < characters.length; i++) {
removeCharacter(characters[i]);
}
}
/**
* Removes the character from the list used for entry validation.
* @param character the character
*/
public void removeCharacter (Character character) {
if (allowable.contains(character)) {
allowable.remove(character);
}
}
/**
* Sets the maximum number of characters for the length of the entry string.
* @param maximumLength the number of characters
*/
public void setMaximumLength (int maximumLength) {
this.maximumLength = maximumLength;
}
/**
* Sets the message that is displayed when there is an entry error.
* @param entryError the entry error message
*/
public void setEntryError (String entryError) {
this.entryError = entryError;
}
/**
* Sets the regular expression that is used for string validation. String
* validation is checked when exiting the text field.
* @param validRegex the validation regular expression
*/
public void setValidRegex (String validRegex) {
this.validRegex = validRegex;
}
/**
* Sets the message that is displayed when there is a validation error.
* @param validError the validation error message
*/
public void setValidError (String validError) {
this.validError = validError;
}
/**
* Sets the color to use for the balloon border.
* @param borderColor the balloon border color
*/
public void setBalloonBorderColor (Color borderColor) {
balloonBorderColor = borderColor;
}
/**
* Sets the color to use for the balloon background.
* @param backgroundColor the balloon background color
*/
public void setBalloonBackgroundColor (Color backgroundColor) {
balloonBackgroundColor = backgroundColor;
}
/**
* Sets the color to use for the balloon text.
* @param textColor the balloon text color
*/
public void setBalloonTextColor (Color textColor) {
balloonTextColor = textColor;
}
/**
* Sets the time in milliseconds that the balloon is visible before
* disappearing. This is the maximum time that the balloon will be visible,
* as other events can also make the balloon disappear.
* @param duration the time in milliseconds
*/
public void setBalloonDuration (Integer duration) {
balloonDuration = duration;
}
/*
* (non-Javadoc)
* @see javax.swing.JTextField#createDefaultModel()
*/
protected Document createDefaultModel () {
return new FilteredTextFieldDocument();
}
/*
* This class defines the document used for the FilteredTextField.
*/
private class FilteredTextFieldDocument extends PlainDocument {
/*
* Create a FilteredTextFieldDocument.
*/
public FilteredTextFieldDocument () {
addDocumentListener(new FilteredTextFieldEar());
}
/*
* (non-Javadoc)
* @see javax.swing.text.PlainDocument#insertString(
* int, java.lang.String, javax.swing.text.AttributeSet)
*/
public void insertString (int offset, String str, AttributeSet a)
throws BadLocationException
{
if (balloon != null && BalloonTipManager.isShowing()) {
if (balloonType == VALID_BALLOON) {
balloon.hide();
}
}
StringBuilder buffer =
new StringBuilder(FilteredTextField.this.getText());
if (offset >= 0 && offset <= buffer.length()) {
buffer.insert(offset, str);
String strBuf = buffer.toString();
if (buffer.length() > maximumLength) {
if (balloon != null && BalloonTipManager.isShowing()) {
if (balloonType == LENGTH_BALLOON) {
BalloonTipManager.restartTimer();
return;
}
else {
balloon.hide();
}
}
balloon = BalloonTipManager.getBalloonTip(FilteredTextField.this,
"The number of characters must be less than or equal to " +
maximumLength, 0, 0, balloonDuration, balloonBorderColor,
balloonBackgroundColor, balloonTextColor);
balloon.show();
balloonType = LENGTH_BALLOON;
return;
}
if (strBuf == null || strBuf.equals("")) {
remove(0, getLength());
super.insertString(0, "", null);
if (balloon != null && BalloonTipManager.isShowing()) {
balloon.hide();
}
return;
}
if (allowable.contains(str.charAt(0))) {
super.insertString(offset, str, a);
if (balloon != null && BalloonTipManager.isShowing()) {
balloon.hide();
}
}
else {
if (balloon != null && BalloonTipManager.isShowing()) {
if (balloonType == ENTRY_BALLOON) {
BalloonTipManager.restartTimer();
return;
}
else {
balloon.hide();
}
}
balloon = BalloonTipManager.getBalloonTip(FilteredTextField.this,
entryError, 0, 0, balloonDuration, balloonBorderColor,
balloonBackgroundColor, balloonTextColor);
balloon.show();
balloonType = ENTRY_BALLOON;
}
}
}
/*
* This listener class is needed to catch character removal events.
*/
private class FilteredTextFieldEar implements DocumentListener {
/*
* (non-Javadoc)
* @see javax.swing.event.DocumentListener#insertUpdate(
* javax.swing.event.DocumentEvent)
*/
public void insertUpdate (DocumentEvent e) {/* N/A */}
/*
* (non-Javadoc)
* @see javax.swing.event.DocumentListener#removeUpdate(
* javax.swing.event.DocumentEvent)
*/
public void removeUpdate (DocumentEvent e) {
if (balloon != null && BalloonTipManager.isShowing())
{
balloon.hide();
}
}
/*
* (non-Javadoc)
* @see javax.swing.event.DocumentListener#changedUpdate(
* javax.swing.event.DocumentEvent)
*/
public void changedUpdate (DocumentEvent e) {/* N/A */}
}
}
/*
* This listener class is used to determine whether the string is valid based
* on a regular expression. The validation is tested when leaving the text
* field, and notification is performed when returning to the text field.
*/
private class ValidationEar extends FocusAdapter {
/*
* (non-Javadoc)
* @see java.awt.event.FocusAdapter#focusLost(java.awt.event.FocusEvent)
*/
public void focusLost (FocusEvent e) {
String entered = getText().trim();
if (!entered.matches(validRegex)) {
if (balloon != null) {
balloon.hide();
}
setBorder(
BorderFactory.createCompoundBorder(RED_BORDER, defaultBorder));
isValid = false;
}
else {
setBorder(defaultBorder);
isValid = true;
}
}
/*
* (non-Javadoc)
* @see java.awt.event.FocusAdapter#focusGained(java.awt.event.FocusEvent)
*/
public void focusGained (FocusEvent e) {
if (!isValid) {
balloon = BalloonTipManager.getBalloonTip(FilteredTextField.this,
validError, 0, 0, balloonDuration, balloonBorderColor,
balloonBackgroundColor, balloonTextColor);
balloon.show();
balloonType = VALID_BALLOON;
}
}
}
/*
* A main entry point to test the FilteredTextField.
* @param args application arguments
*/
public static void main (String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception e) {
e.printStackTrace();
}
JFrame jframe = new JFrame("Balloon Tips on FilteredTextField");
jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jframe.setSize(400, 75);
jframe.setLocation(400, 400);
JPanel jpanel = new JPanel();
jpanel.setLayout(new BorderLayout());
FilteredTextField ftfield = new FilteredTextField(10);
ftfield.setCharacters(LOWERCASE_CHARS);
ftfield.addCharacter('-');
ftfield.addCharacter('_');
ftfield.addCharacter(' ');
ftfield.setMaximumLength(10);
ftfield.setEntryError(
"Only lower case letters, hyphens, underscores, and spaces allowed.");
ftfield.setValidRegex("^a+[a-z-_ ]*");
ftfield.setValidError("The string must begin with the letter 'a'.");
jpanel.add(new JLabel("Type some text into either field"), BorderLayout.NORTH);
jpanel.add(ftfield, BorderLayout.CENTER);
jpanel.add(new FilteredTextField(10), BorderLayout.SOUTH);
jframe.getContentPane().add(jpanel);
jframe.setVisible(true);
}
}
+8
Ver Arquivo
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/jnalib/dist/jna.jar"/>
<classpathentry kind="src" path="/platform"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+17
Ver Arquivo
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>dnddemo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
+68
Ver Arquivo
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jnacontrib.dnddemo" default="jar" basedir=".">
<description>Builds, tests, and runs the project jnacontrib.dnddemo.</description>
<!-- Locations -->
<property name="src" location="."/>
<property name="build" location="build"/>
<property name="jna-dist" location="../../dist"/>
<property name="classes" location="${build}/classes"/>
<property name="jar" location="${build}/demo-dnd.jar"/>
<property name="file.reference.jna.jar" location="../../build/jna.jar"/>
<property name="main-class" value="com.sun.jna.contrib.demo.GhostedDragImageDemo" />
<path id="classpath">
<fileset file="${file.reference.jna.jar}"/>
<fileset dir="../platform/dist" includes="jna-platform.jar"/>
</path>
<!-- Run Demo. -->
<target name="run" depends="compile">
<java classname="${main-class}" fork="true">
<classpath>
<pathelement location="${classes}" />
<path refid="classpath"/>
</classpath>
</java>
</target>
<!-- Delete class and jar files. -->
<target name="clean">
<delete dir="${classes}"/>
<delete file="${jar}"/>
<delete dir="${build}"/>
</target>
<!-- Compile all classes. -->
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
<javac srcdir="${src}" destdir="${classes}" target="1.5" source="1.5"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
</classpath>
</javac>
</target>
<!-- Create jar-file. -->
<target name="jar" depends="compile">
<!-- Copy all non-java files to classes. -->
<copy todir="${classes}/com">
<fileset dir="${src}/com">
<exclude name="**/*.java"/>
</fileset>
</copy>
<jar jarfile="${jar}" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
<!-- platform -->
<fileset dir="../platform/build/classes/com"/>
<!-- jna -->
<zipfileset src="${file.reference.jna.jar}"/>
</jar>
</target>
</project>
@@ -10,7 +10,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.examples.dnd;
package com.sun.jna.contrib.demo;
import java.awt.Image;
import java.awt.Point;
@@ -32,6 +32,10 @@ import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.UIManager;
import com.sun.jna.platform.dnd.DragHandler;
import com.sun.jna.platform.dnd.DropHandler;
/** Demonstrate ghosted drag images. Unfortunately, Swing drag support hides
* the hooks we need to move the drag image around, so we don't use it and
* roll our own.
@@ -59,7 +63,8 @@ public class GhostedDragImageDemo {
}
public static class DragLabel extends JLabel {
private boolean dragging;
private static final long serialVersionUID = 1L;
private boolean dragging;
public DragLabel(Icon icon) {
super(icon);
new DragHandler(this, DnDConstants.ACTION_COPY_OR_MOVE) {

Antes

Largura:  |  Altura:  |  Tamanho: 28 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 28 KiB

@@ -7,7 +7,7 @@
<body bgcolor="white">
<!-- One sentence summary -->
Provides Windows-specific support for JNA.
Cross-platform ghosted drag image implementation with demo application.
</body>
</html>
@@ -0,0 +1,206 @@
/*
* Copyright 2014 Martin Steiger
*
* 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 com.sun.jna.contrib.demo;
import com.sun.jna.Memory;
import com.sun.jna.platform.EnumUtils;
import com.sun.jna.platform.win32.Dxva2;
import com.sun.jna.platform.win32.HighLevelMonitorConfigurationAPI;
import com.sun.jna.platform.win32.HighLevelMonitorConfigurationAPI.MC_COLOR_TEMPERATURE;
import com.sun.jna.platform.win32.HighLevelMonitorConfigurationAPI.MC_DISPLAY_TECHNOLOGY_TYPE;
import com.sun.jna.platform.win32.HighLevelMonitorConfigurationAPI.MC_DRIVE_TYPE;
import com.sun.jna.platform.win32.HighLevelMonitorConfigurationAPI.MC_GAIN_TYPE;
import com.sun.jna.platform.win32.HighLevelMonitorConfigurationAPI.MC_POSITION_TYPE;
import com.sun.jna.platform.win32.HighLevelMonitorConfigurationAPI.MC_SIZE_TYPE;
import com.sun.jna.platform.win32.LowLevelMonitorConfigurationAPI.MC_TIMING_REPORT;
import com.sun.jna.platform.win32.PhysicalMonitorEnumerationAPI.PHYSICAL_MONITOR;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WTypes.LPSTR;
import com.sun.jna.platform.win32.WinDef.DWORD;
import com.sun.jna.platform.win32.WinDef.DWORDByReference;
import com.sun.jna.platform.win32.WinDef.HDC;
import com.sun.jna.platform.win32.WinDef.LPARAM;
import com.sun.jna.platform.win32.WinDef.RECT;
import com.sun.jna.platform.win32.WinNT.HANDLE;
import com.sun.jna.platform.win32.WinUser;
import com.sun.jna.platform.win32.WinUser.HMONITOR;
import com.sun.jna.platform.win32.WinUser.MONITORENUMPROC;
import com.sun.jna.platform.win32.WinUser.MONITORINFOEX;
/**
* A small demo that tests the Win32 monitor API.
* All available physical and virtual monitors are enumerated and
* their capabilities printed to stdout
* @author Martin Steiger
*/
public class MonitorInfoDemo
{
/**
* @param args (ignored)
*/
public static void main(String[] args)
{
System.out.println("Installed Physical Monitors: " + User32.INSTANCE.GetSystemMetrics(WinUser.SM_CMONITORS));
User32.INSTANCE.EnumDisplayMonitors(null, null, new MONITORENUMPROC() {
@Override
public int apply(HMONITOR hMonitor, HDC hdc, RECT rect, LPARAM lparam)
{
enumerate(hMonitor);
return 1;
}
}, new LPARAM(0));
}
static void enumerate(HMONITOR hMonitor)
{
System.out.println("Found HMONITOR: " + hMonitor.getPointer().toString());
MONITORINFOEX info = new MONITORINFOEX();
User32.INSTANCE.GetMonitorInfo(hMonitor, info);
System.out.println("Screen " + info.rcMonitor);
System.out.println("Work area " + info.rcWork);
boolean isPrimary = (info.dwFlags & WinUser.MONITORINFOF_PRIMARY) != 0;
System.out.println("Primary? " + (isPrimary ? "yes" : "no"));
System.out.println("Device " + new String(info.szDevice));
DWORDByReference pdwNumberOfPhysicalMonitors = new DWORDByReference();
Dxva2.INSTANCE.GetNumberOfPhysicalMonitorsFromHMONITOR(hMonitor, pdwNumberOfPhysicalMonitors);
int monitorCount = pdwNumberOfPhysicalMonitors.getValue().intValue();
System.out.println("HMONITOR is linked to " + monitorCount + " physical monitors");
PHYSICAL_MONITOR[] physMons = new PHYSICAL_MONITOR[monitorCount];
Dxva2.INSTANCE.GetPhysicalMonitorsFromHMONITOR(hMonitor, monitorCount, physMons);
for (int i = 0; i < monitorCount; i++)
{
HANDLE hPhysicalMonitor = physMons[0].hPhysicalMonitor;
System.out.println("Monitor " + i + " - " + new String(physMons[i].szPhysicalMonitorDescription));
enumeratePhysicalMonitor(hPhysicalMonitor);
}
Dxva2.INSTANCE.DestroyPhysicalMonitors(monitorCount, physMons);
}
/**
* @param hPhysicalMonitor
*/
private static void enumeratePhysicalMonitor(HANDLE hPhysicalMonitor)
{
MC_DISPLAY_TECHNOLOGY_TYPE.ByReference techType = new MC_DISPLAY_TECHNOLOGY_TYPE.ByReference();
Dxva2.INSTANCE.GetMonitorTechnologyType(hPhysicalMonitor, techType);
System.out.println("TECHTYPE: " + techType.getValue());
DWORDByReference temps = new DWORDByReference();
DWORDByReference caps = new DWORDByReference();
Dxva2.INSTANCE.GetMonitorCapabilities(hPhysicalMonitor, caps, temps);
System.out.println("CAPS " + EnumUtils.setFromInteger(caps.getValue().intValue(), HighLevelMonitorConfigurationAPI.MC_CAPS.class));
System.out.println("Temps " + temps.getValue());
// Brightness
DWORDByReference pdwMinimumBrightness = new DWORDByReference();
DWORDByReference pdwCurrentBrightness = new DWORDByReference();
DWORDByReference pdwMaximumBrightness = new DWORDByReference();
Dxva2.INSTANCE.GetMonitorBrightness(hPhysicalMonitor, pdwMinimumBrightness, pdwCurrentBrightness, pdwMaximumBrightness);
System.out.println("Brightness Min: " + pdwMinimumBrightness.getValue());
System.out.println("Brightness Current: " + pdwCurrentBrightness.getValue());
System.out.println("Brightness Max: " + pdwMaximumBrightness.getValue());
// Contrast
DWORDByReference pdwMinimumContrast = new DWORDByReference();
DWORDByReference pdwCurrentContrast = new DWORDByReference();
DWORDByReference pdwMaximumContrast = new DWORDByReference();
Dxva2.INSTANCE.GetMonitorContrast(hPhysicalMonitor, pdwMinimumContrast, pdwCurrentContrast, pdwMaximumContrast);
System.out.println("Contrast Min: " + pdwMinimumContrast.getValue());
System.out.println("Contrast Current: " + pdwCurrentContrast.getValue());
System.out.println("Contrast Max: " + pdwMaximumContrast.getValue());
// Temperature
MC_COLOR_TEMPERATURE.ByReference pctCurrentColorTemperature = new MC_COLOR_TEMPERATURE.ByReference();
Dxva2.INSTANCE.GetMonitorColorTemperature(hPhysicalMonitor, pctCurrentColorTemperature);
System.out.println("Current Temp: " + pctCurrentColorTemperature.getValue());
// Capabilities string
DWORDByReference pdwCapabilitiesStringLengthInCharacters = new DWORDByReference();
Dxva2.INSTANCE.GetCapabilitiesStringLength(hPhysicalMonitor, pdwCapabilitiesStringLengthInCharacters);
DWORD capStrLen = pdwCapabilitiesStringLengthInCharacters.getValue();
LPSTR pszASCIICapabilitiesString = new LPSTR(new Memory(capStrLen.intValue()));
Dxva2.INSTANCE.CapabilitiesRequestAndCapabilitiesReply(hPhysicalMonitor, pszASCIICapabilitiesString, capStrLen);
System.out.println("Cap-String:" + new String(pszASCIICapabilitiesString.getPointer().getString(0)));
// Position
MC_POSITION_TYPE ptPositionType = MC_POSITION_TYPE.MC_HORIZONTAL_POSITION;
DWORDByReference pdwMinimumPosition = new DWORDByReference();
DWORDByReference pdwCurrentPosition = new DWORDByReference();
DWORDByReference pdwMaximumPosition = new DWORDByReference();
Dxva2.INSTANCE.GetMonitorDisplayAreaPosition(hPhysicalMonitor, ptPositionType, pdwMinimumPosition, pdwCurrentPosition, pdwMaximumPosition);
System.out.println("Position (horz) Min: " + pdwMinimumPosition.getValue());
System.out.println("Position (horz) Current: " + pdwCurrentPosition.getValue());
System.out.println("Position (horz) Max: " + pdwMaximumPosition.getValue());
// Size
MC_SIZE_TYPE ptSizeType = MC_SIZE_TYPE.MC_WIDTH;
DWORDByReference pdwMinimumSize = new DWORDByReference();
DWORDByReference pdwCurrentSize = new DWORDByReference();
DWORDByReference pdwMaximumSize = new DWORDByReference();
Dxva2.INSTANCE.GetMonitorDisplayAreaSize(hPhysicalMonitor, ptSizeType, pdwMinimumSize, pdwCurrentSize, pdwMaximumSize);
System.out.println("Width Min: " + pdwMinimumSize.getValue());
System.out.println("Width Current: " + pdwCurrentSize.getValue());
System.out.println("Width Max: " + pdwMaximumSize.getValue());
// Gain
MC_GAIN_TYPE ptGainType = MC_GAIN_TYPE.MC_RED_GAIN;
DWORDByReference pdwMinimumGain = new DWORDByReference();
DWORDByReference pdwCurrentGain = new DWORDByReference();
DWORDByReference pdwMaximumGain = new DWORDByReference();
Dxva2.INSTANCE.GetMonitorRedGreenOrBlueGain(hPhysicalMonitor, ptGainType, pdwMinimumGain, pdwCurrentGain, pdwMaximumGain);
System.out.println("Red Gain Min: " + pdwMinimumSize.getValue());
System.out.println("Red Gain Current: " + pdwCurrentSize.getValue());
System.out.println("Red Gain Max: " + pdwMaximumSize.getValue());
// Drive
MC_DRIVE_TYPE ptDriveType = MC_DRIVE_TYPE.MC_RED_DRIVE;
DWORDByReference pdwMinimumDrive = new DWORDByReference();
DWORDByReference pdwCurrentDrive = new DWORDByReference();
DWORDByReference pdwMaximumDrive = new DWORDByReference();
Dxva2.INSTANCE.GetMonitorRedGreenOrBlueDrive(hPhysicalMonitor, ptDriveType, pdwMinimumDrive, pdwCurrentDrive, pdwMaximumDrive);
System.out.println("Red Drive Min: " + pdwMinimumSize.getValue());
System.out.println("Red Drive Current: " + pdwCurrentSize.getValue());
System.out.println("Red Drive Max: " + pdwMaximumSize.getValue());
// Timing Report
MC_TIMING_REPORT pmtrMonitorTimingReport = new MC_TIMING_REPORT();
Dxva2.INSTANCE.GetTimingReport(hPhysicalMonitor, pmtrMonitorTimingReport);
System.out.println("HorizontalFrequencyInHZ " + pmtrMonitorTimingReport.dwHorizontalFrequencyInHZ);
System.out.println("VerticalFrequencyInHZ " + pmtrMonitorTimingReport.dwVerticalFrequencyInHZ);
System.out.println("--------------------------------------");
}
}
+8
Ver Arquivo
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry combineaccessrules="false" kind="src" path="/jnalib"/>
<classpathentry kind="var" path="JNA_LIB"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+17
Ver Arquivo
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>msoffice</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Arquivo binário não exibido.
Arquivo binário não exibido.
@@ -0,0 +1,43 @@
package com.sun.jna.platform.win32.COM;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import com.sun.jna.platform.win32.COM.COMUtils;
import com.sun.jna.platform.win32.COM.COMUtils.COMInfo;
public class COMInfoUtil {
public static void main(String[] args) {
FileWriter writer = null;
try {
String filename = "C:\\TEMP\\CLSIDs.txt";
ArrayList<COMInfo> comInfos = COMUtils.getAllCOMInfoOnSystem();
writer = new FileWriter(filename);
for (COMInfo comInfo : comInfos) {
String result = "CLSID: " + comInfo.clsid + "\n";
result += "InprocHandler32: " + comInfo.inprocHandler32 + "\n";
result += "InprocServer32: " + comInfo.inprocServer32 + "\n";
result += "LocalServer32: " + comInfo.localServer32 + "\n";
result += "ProgID: " + comInfo.progID + "\n";
result += "ProgTypeLibID: " + comInfo.typeLib + "\n";
writer.write(result + "\n");
}
System.out.println("file written to: " + filename);
System.out.println("Found CLSID`s on the system: "
+ comInfos.size());
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
@@ -0,0 +1,97 @@
package com.sun.jna.platform.win32.COM.office;
import com.sun.jna.platform.win32.Variant.VARIANT;
import com.sun.jna.platform.win32.COM.COMException;
import com.sun.jna.platform.win32.COM.COMLateBindingObject;
import com.sun.jna.platform.win32.COM.IDispatch;
public class MSExcel extends COMLateBindingObject {
public MSExcel() throws COMException {
super("Excel.Application", false);
}
public MSExcel(boolean visible) throws COMException {
this();
this.setVisible(visible);
}
public void setVisible(boolean bVisible) throws COMException {
this.setProperty("Visible", bVisible);
}
public String getVersion() throws COMException {
return this.getStringProperty("Version");
}
public void newExcelBook() throws COMException {
this.invokeNoReply("Add", getWorkbooks());
}
public void openExcelBook(String filename, boolean bVisible)
throws COMException {
// OpenDocument
this.invokeNoReply("Open", getWorkbooks(), new VARIANT(filename));
}
public void closeActiveWorkbook(boolean bSave) throws COMException {
this.invokeNoReply("Close", getActiveWorkbook(), new VARIANT(bSave));
}
public void quit() throws COMException {
this.invokeNoReply("Quit");
}
public void insertValue(String range, String value) throws COMException {
Range pRange = new Range(this.getAutomationProperty("Range",
this.getActiveSheet(), new VARIANT(range)));
this.setProperty("Value", pRange, new VARIANT(value));
}
public Application getApplication() {
return new Application(this.getAutomationProperty("Application"));
}
public ActiveWorkbook getActiveWorkbook() {
return new ActiveWorkbook(this.getAutomationProperty("ActiveWorkbook"));
}
public Workbooks getWorkbooks() {
return new Workbooks(this.getAutomationProperty("WorkBooks"));
}
public ActiveSheet getActiveSheet() {
return new ActiveSheet(this.getAutomationProperty("ActiveSheet"));
}
public class Application extends COMLateBindingObject {
public Application(IDispatch iDispatch) throws COMException {
super(iDispatch);
}
}
public class Workbooks extends COMLateBindingObject {
public Workbooks(IDispatch iDispatch) throws COMException {
super(iDispatch);
}
}
public class ActiveWorkbook extends COMLateBindingObject {
public ActiveWorkbook(IDispatch iDispatch) throws COMException {
super(iDispatch);
}
}
public class ActiveSheet extends COMLateBindingObject {
public ActiveSheet(IDispatch iDispatch) throws COMException {
super(iDispatch);
}
}
public class Range extends COMLateBindingObject {
public Range(IDispatch iDispatch) throws COMException {
super(iDispatch);
}
}
}
@@ -0,0 +1,123 @@
package com.sun.jna.platform.win32.COM.office;
import java.io.File;
import com.sun.jna.platform.win32.COM.COMException;
import com.sun.jna.platform.win32.WinDef.LONG;
public class MSOfficeDemo {
/**
* @param args
*/
public static void main(String[] args) {
new MSOfficeDemo();
}
private String currentWorkingDir = new File("").getAbsolutePath()
+ File.separator;
public MSOfficeDemo() {
this.testMSWord();
// this.testMSExcel();
}
public void testMSWord() {
MSWord msWord = null;
// http://msdn.microsoft.com/en-us/library/office/ff839952(v=office.15).aspx
LONG wdFormatPDF = new LONG(17); // PDF format.
LONG wdFormatRTF = new LONG(6); // Rich text format (RTF).
LONG wdFormatHTML = new LONG(8); // Standard HTML format.
LONG wdFormatDocument = new LONG(0); // Microsoft Office Word 97 - 2003 binary file format.
LONG wdFormatDocumentDefault = new LONG(16); // Word default document file format. For Word 2010, this is the DOCX format.
// http://msdn.microsoft.com/en-us/library/office/ff838709(v=office.15).aspx
LONG wdOriginalDocumentFormat = new LONG(1); // Original document format.
LONG wdPromptUser = new LONG(2); // Prompt user to select a document format.
LONG wdWordDocument = new LONG(0); // Microsoft Word document format.
try {
msWord = new MSWord();
System.out.println("MSWord version: " + msWord.getVersion());
msWord.setVisible(true);
// msWord.newDocument();
msWord.openDocument(currentWorkingDir + "jnatest.doc", true);
msWord.insertText("Hello from JNA! \n\n");
// wait 10sec. before closing
Thread.currentThread().sleep(1000);
// save in different formats
// pdf format is only supported in MSWord 2007 and above
msWord.SaveAs("C:\\TEMP\\jnatestSaveAs.doc", wdFormatDocument);
msWord.SaveAs("C:\\TEMP\\jnatestSaveAs.pdf", wdFormatPDF);
msWord.SaveAs("C:\\TEMP\\jnatestSaveAs.rtf", wdFormatRTF);
msWord.SaveAs("C:\\TEMP\\jnatestSaveAs.html", wdFormatHTML);
// close and save the document
msWord.closeActiveDocument(false);
msWord.newDocument();
// msWord.openDocument(currentWorkingDir + "jnatest.doc", true);
msWord.insertText("Hello from JNA! \n Please notice that JNA can control MS Word via the new COM interface! \nHere we are creating a new word document and we save it to the 'TEMP' directory!");
// save with no user prompt
msWord.SaveAs("C:\\TEMP\\jnatestNewDoc1.docx", wdFormatDocumentDefault);
msWord.SaveAs("C:\\TEMP\\jnatestNewDoc2.docx", wdFormatDocumentDefault);
msWord.SaveAs("C:\\TEMP\\jnatestNewDoc3.docx", wdFormatDocumentDefault);
// close and save the document
msWord.closeActiveDocument(false);
// open 3 documents
msWord.openDocument("C:\\TEMP\\jnatestNewDoc1.docx", true);
msWord.insertText("Hello some changes from JNA!\n");
msWord.openDocument("C:\\TEMP\\jnatestNewDoc2.docx", true);
msWord.insertText("Hello some changes from JNA!\n");
msWord.openDocument("C:\\TEMP\\jnatestNewDoc3.docx", true);
msWord.insertText("Hello some changes from JNA!\n");
// save the document and prompt the user
msWord.Save(false, wdPromptUser);
// wait then close word
msWord.quit();
} catch(InterruptedException ie) {
ie.printStackTrace();
} catch (COMException e) {
if (e.getExcepInfo() != null) {
System.out
.println("bstrSource: " + e.getExcepInfo().bstrSource);
System.out.println("bstrDescription: "
+ e.getExcepInfo().bstrDescription);
}
// print stack trace
e.printStackTrace();
if (msWord != null)
msWord.quit();
}
}
public void testMSExcel() {
MSExcel msExcel = null;
try {
msExcel = new MSExcel();
System.out.println("MSExcel version: " + msExcel.getVersion());
msExcel.setVisible(true);
// msExcel.newExcelBook();
msExcel.openExcelBook(currentWorkingDir + "jnatest.xls", true);
msExcel.insertValue("A1", "Hello from JNA!");
// wait 10sec. before closing
Thread.currentThread().sleep(10000);
// close and save the active sheet
msExcel.closeActiveWorkbook(true);
msExcel.setVisible(true);
// msExcel.newExcelBook();
msExcel.openExcelBook(currentWorkingDir + "jnatest.xls", true);
msExcel.insertValue("A1", "Hello from JNA!");
// close and save the active sheet
msExcel.closeActiveWorkbook(true);
} catch (Exception e) {
e.printStackTrace();
if (msExcel != null)
msExcel.quit();
}
}
}
@@ -0,0 +1,107 @@
package com.sun.jna.platform.win32.COM.office;
import com.sun.jna.platform.win32.Variant.VARIANT;
import com.sun.jna.platform.win32.COM.COMException;
import com.sun.jna.platform.win32.COM.COMLateBindingObject;
import com.sun.jna.platform.win32.COM.IDispatch;
import com.sun.jna.platform.win32.WinDef.LONG;
public class MSWord extends COMLateBindingObject {
public MSWord() throws COMException {
super("Word.Application", false);
}
public MSWord(boolean visible) throws COMException {
this();
this.setVisible(visible);
}
public void setVisible(boolean bVisible) throws COMException {
this.setProperty("Visible", bVisible);
}
public String getVersion() throws COMException {
return this.getStringProperty("Version");
}
public void newDocument() throws COMException {
this.invokeNoReply("Add", getDocuments());
}
public void openDocument(String filename, boolean bVisible)
throws COMException {
// OpenDocument
this.invokeNoReply("Open", getDocuments(), new VARIANT(filename));
}
public void closeActiveDocument(boolean bSave) throws COMException {
this.invokeNoReply("Close", getActiveDocument(), new VARIANT(bSave));
}
public void quit() throws COMException {
this.invokeNoReply("Quit");
}
public void insertText(String text) throws COMException {
Selection pSelection = new Selection(this.getAutomationProperty(
"Selection", this.getIDispatch()));
this.invokeNoReply("TypeText", pSelection, new VARIANT(text));
}
public void Save(boolean bNoPrompt, LONG originalFormat) throws COMException {
VARIANT vtNoPrompt = new VARIANT(bNoPrompt);
VARIANT vtOriginalFormat = new VARIANT(originalFormat);
this.invokeNoReply("Save", this.getDocuments(),
vtNoPrompt, vtOriginalFormat);
}
public void SaveAs(String FileName, LONG FileFormat) throws COMException {
VARIANT vtFileName = new VARIANT(FileName);
VARIANT vtFileFormat = new VARIANT(FileFormat);
this.invokeNoReply("SaveAs", this.getActiveDocument(),
vtFileName, vtFileFormat);
}
public ActiveDocument getActiveDocument() {
return new ActiveDocument(this.getAutomationProperty("ActiveDocument"));
}
public Documents getDocuments() {
// GetDocuments
Documents pDocuments = new Documents(this.getAutomationProperty(
"Documents", this.getApplication().getIDispatch()));
return pDocuments;
}
public Application getApplication() {
return new Application(this.getAutomationProperty("Application"));
}
public class Application extends COMLateBindingObject {
public Application(IDispatch iDispatch) throws COMException {
super(iDispatch);
}
}
public class Documents extends COMLateBindingObject {
public Documents(IDispatch iDispatch) throws COMException {
super(iDispatch);
}
}
public class ActiveDocument extends COMLateBindingObject {
public ActiveDocument(IDispatch iDispatch) throws COMException {
super(iDispatch);
}
}
public class Selection extends COMLateBindingObject {
public Selection(IDispatch iDispatch) throws COMException {
super(iDispatch);
}
}
}
+8
Ver Arquivo
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/jnalib"/>
<classpathentry kind="lib" path="C:/GitHub/jna-3.5.1.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+17
Ver Arquivo
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>native_window_msg</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,381 @@
/* Copyright (c) 2012 Tobias Wolf, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform.win32;
import com.sun.jna.WString;
import com.sun.jna.platform.win32.DBT;
import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_DEVICEINTERFACE;
import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_HANDLE;
import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_HDR;
import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_OEM;
import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_PORT;
import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_VOLUME;
import com.sun.jna.platform.win32.Kernel32;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinDef.HMODULE;
import com.sun.jna.platform.win32.WinDef.HWND;
import com.sun.jna.platform.win32.WinDef.LPARAM;
import com.sun.jna.platform.win32.WinDef.LRESULT;
import com.sun.jna.platform.win32.WinDef.WPARAM;
import com.sun.jna.platform.win32.WinUser;
import com.sun.jna.platform.win32.WinUser.HDEVNOTIFY;
import com.sun.jna.platform.win32.WinUser.MSG;
import com.sun.jna.platform.win32.WinUser.WNDCLASSEX;
import com.sun.jna.platform.win32.WinUser.WindowProc;
import com.sun.jna.platform.win32.Wtsapi32;
// TODO: Auto-generated Javadoc
/**
* The Class Win32WindowTest.
*/
public class Win32WindowDemo implements WindowProc {
/**
* Instantiates a new win32 window test.
*/
public Win32WindowDemo() {
// define new window class
WString windowClass = new WString("MyWindowClass");
HMODULE hInst = Kernel32.INSTANCE.GetModuleHandle("");
WNDCLASSEX wClass = new WNDCLASSEX();
wClass.hInstance = hInst;
wClass.lpfnWndProc = Win32WindowDemo.this;
wClass.lpszClassName = windowClass;
// register window class
User32.INSTANCE.RegisterClassEx(wClass);
getLastError();
// create new window
HWND hWnd = User32.INSTANCE
.CreateWindowEx(
User32.WS_EX_TOPMOST,
windowClass,
"My hidden helper window, used only to catch the windows events",
0, 0, 0, 0, 0,
null, // WM_DEVICECHANGE contradicts parent=WinUser.HWND_MESSAGE
null, hInst, null);
getLastError();
System.out.println("window sucessfully created! window hwnd: "
+ hWnd.getPointer().toString());
Wtsapi32.INSTANCE.WTSRegisterSessionNotification(hWnd,
Wtsapi32.NOTIFY_FOR_THIS_SESSION);
/* this filters for all device classes */
// DEV_BROADCAST_HDR notificationFilter = new DEV_BROADCAST_HDR();
// notificationFilter.dbch_devicetype = DBT.DBT_DEVTYP_DEVICEINTERFACE;
/* this filters for all usb device classes */
DEV_BROADCAST_DEVICEINTERFACE notificationFilter = new DEV_BROADCAST_DEVICEINTERFACE();
notificationFilter.dbcc_size = notificationFilter.size();
notificationFilter.dbcc_devicetype = DBT.DBT_DEVTYP_DEVICEINTERFACE;
notificationFilter.dbcc_classguid = DBT.GUID_DEVINTERFACE_USB_DEVICE;
/*
* use User32.DEVICE_NOTIFY_ALL_INTERFACE_CLASSES instead of
* DEVICE_NOTIFY_WINDOW_HANDLE to ignore the dbcc_classguid value
*/
HDEVNOTIFY hDevNotify = User32.INSTANCE.RegisterDeviceNotification(
hWnd, notificationFilter, User32.DEVICE_NOTIFY_WINDOW_HANDLE);
getLastError();
if (hDevNotify != null)
System.out.println("RegisterDeviceNotification was sucessfully!");
MSG msg = new MSG();
while (User32.INSTANCE.GetMessage(msg, hWnd, 0, 0) != 0) {
User32.INSTANCE.TranslateMessage(msg);
User32.INSTANCE.DispatchMessage(msg);
}
User32.INSTANCE.UnregisterDeviceNotification(hDevNotify);
Wtsapi32.INSTANCE.WTSUnRegisterSessionNotification(hWnd);
User32.INSTANCE.UnregisterClass(windowClass, hInst);
User32.INSTANCE.DestroyWindow(hWnd);
System.out.println("program exit!");
}
/*
* (non-Javadoc)
*
* @see
* com.sun.jna.platform.win32.User32.WindowProc#callback(com.sun.jna.platform
* .win32.WinDef.HWND, int, com.sun.jna.platform.win32.WinDef.WPARAM,
* com.sun.jna.platform.win32.WinDef.LPARAM)
*/
public LRESULT callback(HWND hwnd, int uMsg, WPARAM wParam, LPARAM lParam) {
switch (uMsg) {
case WinUser.WM_CREATE: {
onCreate(wParam, lParam);
return new LRESULT(0);
}
case WinUser.WM_DESTROY: {
User32.INSTANCE.PostQuitMessage(0);
return new LRESULT(0);
}
case WinUser.WM_SESSION_CHANGE: {
this.onSessionChange(wParam, lParam);
return new LRESULT(0);
}
case WinUser.WM_DEVICECHANGE: {
LRESULT lResult = this.onDeviceChange(wParam, lParam);
return lResult != null ? lResult :
User32.INSTANCE.DefWindowProc(hwnd, uMsg, wParam, lParam);
}
default:
return User32.INSTANCE.DefWindowProc(hwnd, uMsg, wParam, lParam);
}
}
/**
* Gets the last error.
*
* @return the last error
*/
public int getLastError() {
int rc = Kernel32.INSTANCE.GetLastError();
if (rc != 0)
System.out.println("error: " + rc);
return rc;
}
/**
* On session change.
*
* @param wParam
* the w param
* @param lParam
* the l param
*/
protected void onSessionChange(WPARAM wParam, LPARAM lParam) {
switch (wParam.intValue()) {
case Wtsapi32.WTS_CONSOLE_CONNECT: {
this.onConsoleConnect(lParam.intValue());
break;
}
case Wtsapi32.WTS_CONSOLE_DISCONNECT: {
this.onConsoleDisconnect(lParam.intValue());
break;
}
case Wtsapi32.WTS_SESSION_LOGON: {
this.onMachineLogon(lParam.intValue());
break;
}
case Wtsapi32.WTS_SESSION_LOGOFF: {
this.onMachineLogoff(lParam.intValue());
break;
}
case Wtsapi32.WTS_SESSION_LOCK: {
this.onMachineLocked(lParam.intValue());
break;
}
case Wtsapi32.WTS_SESSION_UNLOCK: {
this.onMachineUnlocked(lParam.intValue());
break;
}
}
}
/**
* On console connect.
*
* @param sessionId
* the session id
*/
protected void onConsoleConnect(int sessionId) {
System.out.println("onConsoleConnect: " + sessionId);
}
/**
* On console disconnect.
*
* @param sessionId
* the session id
*/
protected void onConsoleDisconnect(int sessionId) {
System.out.println("onConsoleDisconnect: " + sessionId);
}
/**
* On machine locked.
*
* @param sessionId
* the session id
*/
protected void onMachineLocked(int sessionId) {
System.out.println("onMachineLocked: " + sessionId);
}
/**
* On machine unlocked.
*
* @param sessionId
* the session id
*/
protected void onMachineUnlocked(int sessionId) {
System.out.println("onMachineUnlocked: " + sessionId);
}
/**
* On machine logon.
*
* @param sessionId
* the session id
*/
protected void onMachineLogon(int sessionId) {
System.out.println("onMachineLogon: " + sessionId);
}
/**
* On machine logoff.
*
* @param sessionId
* the session id
*/
protected void onMachineLogoff(int sessionId) {
System.out.println("onMachineLogoff: " + sessionId);
}
/**
* On device change.
*
* @param wParam
* the w param
* @param lParam
* the l param
* @return the result. Null if the message is not processed.
*/
protected LRESULT onDeviceChange(WPARAM wParam, LPARAM lParam) {
switch (wParam.intValue()) {
case DBT.DBT_DEVICEARRIVAL: {
return onDeviceChangeArrival(lParam);
}
case DBT.DBT_DEVICEREMOVECOMPLETE: {
return onDeviceChangeRemoveComplete(lParam);
}
case DBT.DBT_DEVNODES_CHANGED: {
//lParam is 0 for this wParam
return onDeviceChangeNodesChanged();
}
default:
System.out
.println("Message WM_DEVICECHANGE message received, value unhandled.");
}
return null;
}
protected LRESULT onDeviceChangeArrivalOrRemoveComplete(LPARAM lParam, String action) {
DEV_BROADCAST_HDR bhdr = new DEV_BROADCAST_HDR(lParam.longValue());
switch (bhdr.dbch_devicetype) {
case DBT.DBT_DEVTYP_DEVICEINTERFACE: {
// see http://msdn.microsoft.com/en-us/library/windows/desktop/aa363244.aspx
DEV_BROADCAST_DEVICEINTERFACE bdif = new DEV_BROADCAST_DEVICEINTERFACE(bhdr.getPointer());
System.out.println("BROADCAST_DEVICEINTERFACE: " + action);
System.out.println("dbcc_devicetype: " + bdif.dbcc_devicetype);
System.out.println("dbcc_name: " + bdif.getDbcc_name());
System.out.println("dbcc_classguid: "
+ bdif.dbcc_classguid.toGuidString());
break;
}
case DBT.DBT_DEVTYP_HANDLE: {
// see http://msdn.microsoft.com/en-us/library/windows/desktop/aa363245.aspx
DEV_BROADCAST_HANDLE bhd = new DEV_BROADCAST_HANDLE(bhdr.getPointer());
System.out.println("BROADCAST_HANDLE: " + action);
break;
}
case DBT.DBT_DEVTYP_OEM: {
// see http://msdn.microsoft.com/en-us/library/windows/desktop/aa363247.aspx
DEV_BROADCAST_OEM boem = new DEV_BROADCAST_OEM(bhdr.getPointer());
System.out.println("BROADCAST_OEM: " + action);
break;
}
case DBT.DBT_DEVTYP_PORT: {
// see http://msdn.microsoft.com/en-us/library/windows/desktop/aa363248.aspx
DEV_BROADCAST_PORT bpt = new DEV_BROADCAST_PORT(bhdr.getPointer());
System.out.println("BROADCAST_PORT: " + action);
break;
}
case DBT.DBT_DEVTYP_VOLUME: {
// see http://msdn.microsoft.com/en-us/library/windows/desktop/aa363249.aspx
DEV_BROADCAST_VOLUME bvl = new DEV_BROADCAST_VOLUME(bhdr.getPointer());
int logicalDriveAffected = bvl.dbcv_unitmask;
short flag = bvl.dbcv_flags;
boolean isMediaNotPhysical = 0 != (flag & DBT.DBTF_MEDIA/*value is 1*/);
boolean isNet = 0 != (flag & DBT.DBTF_NET/*value is 2*/);
System.out.println(action);
int driveLetterIndex = 0;
while (logicalDriveAffected != 0) {
if (0 != (logicalDriveAffected & 1)) {
System.out.println("Logical Drive Letter: " +
((char) ('A' + driveLetterIndex)));
}
logicalDriveAffected >>>= 1;
driveLetterIndex++;
}
System.out.println("isMediaNotPhysical:"+isMediaNotPhysical);
System.out.println("isNet:"+isNet);
break;
}
default:
return null;
}
// return TRUE means processed message for this wParam.
// see http://msdn.microsoft.com/en-us/library/windows/desktop/aa363205.aspx
// see http://msdn.microsoft.com/en-us/library/windows/desktop/aa363208.aspx
return new LRESULT(1);
}
protected LRESULT onDeviceChangeArrival(LPARAM lParam) {
return onDeviceChangeArrivalOrRemoveComplete(lParam, "Arrival");
}
protected LRESULT onDeviceChangeRemoveComplete(LPARAM lParam) {
return onDeviceChangeArrivalOrRemoveComplete(lParam, "Remove Complete");
}
protected LRESULT onDeviceChangeNodesChanged() {
System.out.println("Message DBT_DEVNODES_CHANGED");
// return TRUE means processed message for this wParam.
// see http://msdn.microsoft.com/en-us/library/windows/desktop/aa363211.aspx
return new LRESULT(1);
}
/**
* On create.
*
* @param wParam
* the w param
* @param lParam
* the l param
*/
protected void onCreate(WPARAM wParam, LPARAM lParam) {
System.out.println("onCreate: WM_CREATE");
}
/**
* The main method.
*
* @param args
* the arguments
*/
public static void main(String[] args) {
new Win32WindowDemo();
}
}
+10
Ver Arquivo
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" output="build.eclipse/contrib-test-classes" path="test"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/jnalib"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="lib" path="/jnalib/dist/jna.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+17
Ver Arquivo
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ntservice</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
+60
Ver Arquivo
@@ -0,0 +1,60 @@
Copyright (c) 2007 Thomas Boerkel, All Rights Reserved
Disclaimer:
===========
This code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
Description:
============
Accounts.java:
--------------
Static methods for getting information about Win32 accounts (users
and groups).
- list all domain users
- list all domain groups
- list all local or domain groups where a user belongs to
- get account by SID
- get SID of account
- get domain controller name
- get domain name
Registry.java:
--------------
Static methods for reading and manipulating the Windows Registry.
Only String and DWORD values supported, but could be easily
extended.
- create key
- delete key
- delete value
- read value
- get all sub keys of a key
- get all values of a key
- set value
- check existence of value
Win32Service.java:
------------------
Abstract class to wrap a Win32 service. Derive from this class
to build your own service. Supports only one type of service and
startup, but could be easily extended.
- install service
- uninstall service
- start service
- stop service
- callback for service start request (onStart), should spawn a thread
- callback for service stop request (onStop)
TestService.java:
-----------------
Very simple example of an implementation of Win32Service.java.
Does nothing but starting and stopping (no "useful" work).
+69
Ver Arquivo
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="JnaContrib" default="default" basedir=".">
<description>Builds, tests, and runs the project JnaContrib.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="JnaContrib-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
+3
Ver Arquivo
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
@@ -19,7 +19,7 @@ is divided into following sections:
- cleanup
-->
<project name="JNA_Library-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
<project name="ntservice-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
<target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
<!--
======================
@@ -0,0 +1,8 @@
build.xml.data.CRC32=94714fd7
build.xml.script.CRC32=64128189
build.xml.stylesheet.CRC32=240b97a2
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=94714fd7
nbproject/build-impl.xml.script.CRC32=9d2a0176
nbproject/build-impl.xml.stylesheet.CRC32=65d7ca21
@@ -1,56 +1,59 @@
application.args=
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/jna.jar
dist.javadoc.dir=${dist.dir}/javadoc
file.reference.jnalib-src=src
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=-Xlint:unchecked
javac.deprecation=false
javac.source=1.5
javac.target=1.5
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=
meta.inf.dir=${src.dir}/META-INF
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=-Djava.library.path=./native/testlib/Debug;./native/jnidispatch/Debug
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
src.dir=${file.reference.jnalib-src}
test.src.dir=test
application.args=
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/contrib-ntservice.jar
dist.javadoc.dir=${dist.dir}/javadoc
file.reference.jna.jar=../../build/jna.jar
libs.junit.classpath=../../lib/junit.jar
jar.compress=false
javac.classpath=\
${file.reference.jna.jar};
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.source=1.5
javac.target=1.5
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
${libs.junit.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
src.dir=src
test.src.dir=test
@@ -3,7 +3,7 @@
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>JNA Library</name>
<name>ntservice</name>
<minimum-ant-version>1.6.5</minimum-ant-version>
<source-roots>
<root id="src.dir"/>
@@ -0,0 +1,196 @@
/*
* Advapi32.java
*
* Created on 6. August 2007, 11:24
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package jnacontrib.jna;
import java.util.Arrays;
import java.util.List;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.WString;
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
/**
*
* @author TB
*/
public interface Advapi32 extends StdCallLibrary {
Advapi32 INSTANCE = (Advapi32) Native.loadLibrary("Advapi32",
Advapi32.class, W32APIOptions.UNICODE_OPTIONS);
/*
* SC_HANDLE WINAPI OpenSCManager( LPCTSTR lpMachineName, LPCTSTR
* lpDatabaseName, DWORD dwDesiredAccess );
*/
public Pointer OpenSCManager(String lpMachineName, WString lpDatabaseName,
int dwDesiredAccess);
/*
* BOOL WINAPI CloseServiceHandle( SC_HANDLE hSCObject );
*/
public boolean CloseServiceHandle(Pointer hSCObject);
/*
* SC_HANDLE WINAPI OpenService( SC_HANDLE hSCManager, LPCTSTR
* lpServiceName, DWORD dwDesiredAccess );
*/
public Pointer OpenService(Pointer hSCManager, String lpServiceName,
int dwDesiredAccess);
/*
* BOOL WINAPI StartService( SC_HANDLE hService, DWORD dwNumServiceArgs,
* LPCTSTR* lpServiceArgVectors );
*/
public boolean StartService(Pointer hService, int dwNumServiceArgs,
char[] lpServiceArgVectors);
/*
* BOOL WINAPI ControlService( SC_HANDLE hService, DWORD dwControl,
* LPSERVICE_STATUS lpServiceStatus );
*/
public boolean ControlService(Pointer hService, int dwControl,
SERVICE_STATUS lpServiceStatus);
/*
* BOOL WINAPI StartServiceCtrlDispatcher( const SERVICE_TABLE_ENTRY*
* lpServiceTable );
*/
public boolean StartServiceCtrlDispatcher(Structure[] lpServiceTable);
/*
* SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandler( LPCTSTR
* lpServiceName, LPHANDLER_FUNCTION lpHandlerProc );
*/
public Pointer RegisterServiceCtrlHandler(String lpServiceName,
Handler lpHandlerProc);
/*
* SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerEx( LPCTSTR
* lpServiceName, LPHANDLER_FUNCTION_EX lpHandlerProc, LPVOID lpContext );
*/
public Pointer RegisterServiceCtrlHandlerEx(String lpServiceName,
HandlerEx lpHandlerProc, Pointer lpContext);
/*
* BOOL WINAPI SetServiceStatus( SERVICE_STATUS_HANDLE hServiceStatus,
* LPSERVICE_STATUS lpServiceStatus );
*/
public boolean SetServiceStatus(Pointer hServiceStatus,
SERVICE_STATUS lpServiceStatus);
/*
* SC_HANDLE WINAPI CreateService( SC_HANDLE hSCManager, LPCTSTR
* lpServiceName, LPCTSTR lpDisplayName, DWORD dwDesiredAccess, DWORD
* dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCTSTR
* lpBinaryPathName, LPCTSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCTSTR
* lpDependencies, LPCTSTR lpServiceStartName, LPCTSTR lpPassword );
*/
public Pointer CreateService(Pointer hSCManager, String lpServiceName,
String lpDisplayName, int dwDesiredAccess, int dwServiceType,
int dwStartType, int dwErrorControl, String lpBinaryPathName,
String lpLoadOrderGroup, IntByReference lpdwTagId,
String lpDependencies, String lpServiceStartName, String lpPassword);
/*
* BOOL WINAPI DeleteService( SC_HANDLE hService );
*/
public boolean DeleteService(Pointer hService);
/*
* BOOL WINAPI ChangeServiceConfig2( SC_HANDLE hService, DWORD dwInfoLevel,
* LPVOID lpInfo );
*/
public boolean ChangeServiceConfig2(Pointer hService, int dwInfoLevel,
ChangeServiceConfig2Info lpInfo);
/*
* LONG WINAPI RegEnumValue( HKEY hKey, DWORD dwIndex, LPTSTR lpValueName,
* LPDWORD lpcchValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE
* lpData, LPDWORD lpcbData );
*/
public int RegEnumValue(int hKey, int dwIndex, char[] lpValueName,
IntByReference lpcchValueName, IntByReference reserved,
IntByReference lpType, byte[] lpData, IntByReference lpcbData);
interface SERVICE_MAIN_FUNCTION extends StdCallCallback {
/*
* VOID WINAPI ServiceMain( DWORD dwArgc, LPTSTR* lpszArgv );
*/
public void callback(int dwArgc, Pointer lpszArgv);
}
interface Handler extends StdCallCallback {
/*
* VOID WINAPI Handler( DWORD fdwControl );
*/
public void callback(int fdwControl);
}
interface HandlerEx extends StdCallCallback {
/*
* DWORD WINAPI HandlerEx( DWORD dwControl, DWORD dwEventType, LPVOID
* lpEventData, LPVOID lpContext );
*/
public int callback(int dwControl, int dwEventType,
Pointer lpEventData, Pointer lpContext);
}
/*
* typedef struct _SERVICE_STATUS { DWORD dwServiceType; DWORD
* dwCurrentState; DWORD dwControlsAccepted; DWORD dwWin32ExitCode; DWORD
* dwServiceSpecificExitCode; DWORD dwCheckPoint; DWORD dwWaitHint; }
* SERVICE_STATUS,LPSERVICE_STATUS;
*/
public static class SERVICE_STATUS extends Structure {
public int dwServiceType;
public int dwCurrentState;
public int dwControlsAccepted;
public int dwWin32ExitCode;
public int dwServiceSpecificExitCode;
public int dwCheckPoint;
public int dwWaitHint;
protected List getFieldOrder() {
return Arrays.asList(new String[] { "dwServiceType", "dwCurrentState", "dwControlsAccepted", "dwWin32ExitCode", "dwServiceSpecificExitCode", "dwCheckPoint", "dwWaitHint" });
}
}
/*
* typedef struct _SERVICE_TABLE_ENTRY { LPTSTR lpServiceName;
* LPSERVICE_MAIN_FUNCTION lpServiceProc; } SERVICE_TABLE_ENTRY,
* LPSERVICE_TABLE_ENTRY;
*/
public static class SERVICE_TABLE_ENTRY extends Structure {
public String lpServiceName;
public SERVICE_MAIN_FUNCTION lpServiceProc;
protected List getFieldOrder() {
return Arrays.asList(new String[] { "lpServiceName", "lpServiceProc" });
}
}
public static abstract class ChangeServiceConfig2Info extends Structure {
}
/*
* typedef struct _SERVICE_DESCRIPTION { LPTSTR lpDescription; }
* SERVICE_DESCRIPTION,LPSERVICE_DESCRIPTION;
*/
public static class SERVICE_DESCRIPTION extends ChangeServiceConfig2Info {
public String lpDescription;
protected List getFieldOrder() {
return Arrays.asList(new String[] { "lpDescription" });
}
}
}
@@ -0,0 +1,22 @@
/*
* WINERROR.java
*
* Created on 7. August 2007, 08:09
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package jnacontrib.jna;
/**
*
* @author TB
*/
public interface WINERROR {
public final static int ERROR_SUCCESS = 0;
public final static int NO_ERROR = 0;
public final static int ERROR_FILE_NOT_FOUND = 2;
public final static int ERROR_MORE_DATA = 234;
}
@@ -0,0 +1,36 @@
/*
* WINNT.java
*
* Created on 8. August 2007, 13:41
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package jnacontrib.jna;
/**
*
* @author TB
*/
public interface WINNT {
public final static int DELETE = 0x00010000;
public final static int READ_CONTROL = 0x00020000;
public final static int WRITE_DAC = 0x00040000;
public final static int WRITE_OWNER = 0x00080000;
public final static int SYNCHRONIZE = 0x00100000;
public final static int STANDARD_RIGHTS_REQUIRED = 0x000F0000;
public final static int STANDARD_RIGHTS_READ = READ_CONTROL;
public final static int STANDARD_RIGHTS_WRITE = READ_CONTROL;
public final static int STANDARD_RIGHTS_EXECUTE = READ_CONTROL;
public final static int STANDARD_RIGHTS_ALL = 0x001F0000;
public final static int SPECIFIC_RIGHTS_ALL = 0x0000FFFF;
public final static int GENERIC_EXECUTE = 0x20000000;
public final static int SERVICE_WIN32_OWN_PROCESS = 0x00000010;
}
@@ -0,0 +1,104 @@
/*
* WINSVC.java
*
* Created on 8. August 2007, 15:07
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package jnacontrib.jna;
/**
*
* @author TB
*/
public interface WINSVC {
public final static int SERVICE_CONTROL_STOP = 0x00000001;
public final static int SERVICE_CONTROL_SHUTDOWN = 0x00000005;
public final static int SERVICE_STOPPED = 0x00000001;
public final static int SERVICE_START_PENDING = 0x00000002;
public final static int SERVICE_STOP_PENDING = 0x00000003;
public final static int SERVICE_RUNNING = 0x00000004;
public final static int SERVICE_CONTINUE_PENDING = 0x00000005;
public final static int SERVICE_PAUSE_PENDING = 0x00000006;
public final static int SERVICE_PAUSED = 0x00000007;
public final static int SERVICE_ACCEPT_STOP = 0x00000001;
public final static int SERVICE_ACCEPT_PAUSE_CONTINUE = 0x00000002;
public final static int SERVICE_ACCEPT_SHUTDOWN = 0x00000004;
public final static int SERVICE_ACCEPT_PARAMCHANGE = 0x00000008;
public final static int SERVICE_ACCEPT_NETBINDCHANGE = 0x00000010;
public final static int SC_MANAGER_CONNECT = 0x0001;
public final static int SC_MANAGER_CREATE_SERVICE = 0x0002;
public final static int SC_MANAGER_ENUMERATE_SERVICE = 0x0004;
public final static int SC_MANAGER_LOCK = 0x0008;
public final static int SC_MANAGER_QUERY_LOCK_STATUS = 0x0010;
public final static int SC_MANAGER_MODIFY_BOOT_CONFIG = 0x0020;
public final static int SC_MANAGER_ALL_ACCESS = WINNT.STANDARD_RIGHTS_REQUIRED |
SC_MANAGER_CONNECT |
SC_MANAGER_CREATE_SERVICE |
SC_MANAGER_ENUMERATE_SERVICE |
SC_MANAGER_LOCK |
SC_MANAGER_QUERY_LOCK_STATUS |
SC_MANAGER_MODIFY_BOOT_CONFIG;
public final static int SERVICE_QUERY_CONFIG = 0x0001;
public final static int SERVICE_CHANGE_CONFIG = 0x0002;
public final static int SERVICE_QUERY_STATUS = 0x0004;
public final static int SERVICE_ENUMERATE_DEPENDENTS = 0x0008;
public final static int SERVICE_START = 0x0010;
public final static int SERVICE_STOP = 0x0020;
public final static int SERVICE_PAUSE_CONTINUE = 0x0040;
public final static int SERVICE_INTERROGATE = 0x0080;
public final static int SERVICE_USER_DEFINED_CONTROL = 0x0100;
public final static int SERVICE_ALL_ACCESS = WINNT.STANDARD_RIGHTS_REQUIRED |
SERVICE_QUERY_CONFIG |
SERVICE_CHANGE_CONFIG |
SERVICE_QUERY_STATUS |
SERVICE_ENUMERATE_DEPENDENTS |
SERVICE_START |
SERVICE_STOP |
SERVICE_PAUSE_CONTINUE |
SERVICE_INTERROGATE |
SERVICE_USER_DEFINED_CONTROL;
public final static int SERVICE_CONFIG_DESCRIPTION = 1;
public final static int SERVICE_CONFIG_FAILURE_ACTIONS = 2;
public final static int SERVICE_KERNEL_DRIVER = 0x00000001;
public final static int SERVICE_FILE_SYSTEM_DRIVER = 0x00000002;
public final static int SERVICE_ADAPTER = 0x00000004;
public final static int SERVICE_RECOGNIZER_DRIVER = 0x00000008;
public final static int SERVICE_DRIVER = SERVICE_KERNEL_DRIVER |
SERVICE_FILE_SYSTEM_DRIVER |
SERVICE_RECOGNIZER_DRIVER;
public final static int SERVICE_WIN32_OWN_PROCESS = 0x00000010;
public final static int SERVICE_WIN32_SHARE_PROCESS = 0x00000020;
public final static int SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS;
public final static int SERVICE_INTERACTIVE_PROCESS = 0x00000100;
public final static int SERVICE_TYPE_ALL = SERVICE_WIN32 |
SERVICE_ADAPTER |
SERVICE_DRIVER |
SERVICE_INTERACTIVE_PROCESS;
public final static int SERVICE_BOOT_START = 0x00000000;
public final static int SERVICE_SYSTEM_START = 0x00000001;
public final static int SERVICE_AUTO_START = 0x00000002;
public final static int SERVICE_DEMAND_START = 0x00000003;
public final static int SERVICE_DISABLED = 0x00000004;
public final static int SERVICE_ERROR_IGNORE = 0x00000000;
public final static int SERVICE_ERROR_NORMAL = 0x00000001;
public final static int SERVICE_ERROR_SEVERE = 0x00000002;
public final static int SERVICE_ERROR_CRITICAL = 0x00000003;
}
@@ -0,0 +1,66 @@
/*
* TestService.java
*
* Created on 12. September 2007, 12:49
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package jnacontrib.win32;
/**
* TestService.
*/
public class TestService extends Win32Service {
/**
* main.
* @param args arguments
*/
public static void main(String[] args) {
TestService service = new TestService();
if(args.length == 1) {
if(args[0].equalsIgnoreCase("install")) {
System.out.println(service.install("TestService DisplayName", "TestService Description",
null, null, null));
} else if(args[0].equalsIgnoreCase("uninstall")) {
System.out.println(service.uninstall());
} else {
System.out.println("Arguments:");
System.out.println("install = install service");
System.out.println("uninstall = uninstall service");
System.out.println("<none> = run service");
System.exit(0);
}
} else {
service.init();
}
}
/**
* Creates a new instance of TestService.
*/
public TestService() {
super("TestService");
}
/**
* Will be called on start.
*/
public void onStart() {
}
/**
* Will be called on stop.
*/
public void onStop() {
}
}
@@ -0,0 +1,310 @@
/*
* Win32Service.java
*
* Created on 12. September 2007, 12:05
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package jnacontrib.win32;
import jnacontrib.jna.*;
import com.sun.jna.Pointer;
/**
* Baseclass for a Win32 service.
*/
public abstract class Win32Service {
protected String serviceName;
private ServiceMain serviceMain;
private ServiceControl serviceControl;
private Pointer serviceStatusHandle;
private Object waitObject = new Object();
/**
* Creates a new instance of Win32Service.
*
* @param serviceName internal name of the service
*/
public Win32Service(String serviceName) {
this.serviceName = serviceName;
}
/**
* Install the service.
*
* @param displayName visible name
* @param description description
* @param dependencies array of other services to depend on or null
* @param account service account or null for LocalSystem
* @param password password for service account or null
* @throws java.lang.Exception
* @return true on success
*/
public boolean install(String displayName, String description, String[] dependencies, String account, String password) {
return(install(displayName, description, dependencies, account, password, "java.exe -cp \"" +
System.getProperty("java.class.path") + "\" -Xrs " + this.getClass().getName()));
}
/**
* Install the service.
*
* @return true on success
* @param displayName visible name
* @param description description
* @param dependencies array of other services to depend on or null
* @param account service account or null for LocalSystem
* @param password password for service account or null
* @param command command line to start the service
* @throws java.lang.Exception
*/
public boolean install(String displayName, String description, String[] dependencies, String account, String password, String command) {
Advapi32 advapi32;
Advapi32.SERVICE_DESCRIPTION desc;
Pointer serviceManager, service;
boolean success = false;
String dep = "";
if(dependencies != null) {
for(String s : dependencies) {
dep += s + "\0";
}
}
dep += "\0";
desc = new Advapi32.SERVICE_DESCRIPTION();
desc.lpDescription = description;
advapi32 = Advapi32.INSTANCE;
serviceManager = openServiceControlManager(null, WINSVC.SC_MANAGER_ALL_ACCESS);
if(serviceManager != null) {
service = advapi32.CreateService(serviceManager, serviceName, displayName,
WINSVC.SERVICE_ALL_ACCESS, WINSVC.SERVICE_WIN32_OWN_PROCESS, WINSVC.SERVICE_DEMAND_START,
WINSVC.SERVICE_ERROR_NORMAL,
command,
null, null, dep, account, password);
if(service != null) {
success = advapi32.ChangeServiceConfig2(service, WINSVC.SERVICE_CONFIG_DESCRIPTION, desc);
advapi32.CloseServiceHandle(service);
}
advapi32.CloseServiceHandle(serviceManager);
}
return(success);
}
/**
* Uninstall the service.
*
* @throws java.lang.Exception
* @return true on success
*/
public boolean uninstall() {
Advapi32 advapi32;
Pointer serviceManager, service;
boolean success = false;
advapi32 = Advapi32.INSTANCE;
serviceManager = openServiceControlManager(null, WINSVC.SC_MANAGER_ALL_ACCESS);
if(serviceManager != null) {
service = advapi32.OpenService(serviceManager, serviceName, WINSVC.SERVICE_ALL_ACCESS);
if(service != null) {
success = advapi32.DeleteService(service);
advapi32.CloseServiceHandle(service);
}
advapi32.CloseServiceHandle(serviceManager);
}
return(success);
}
/**
* Ask the ServiceControlManager to start the service.
* @return true on success
*/
public boolean start() {
Advapi32 advapi32;
Pointer serviceManager, service;
boolean success = false;
advapi32 = Advapi32.INSTANCE;
serviceManager = openServiceControlManager(null, WINNT.GENERIC_EXECUTE);
if(serviceManager != null) {
service = advapi32.OpenService(serviceManager, serviceName, WINNT.GENERIC_EXECUTE);
if(service != null) {
success = advapi32.StartService(service, 0, null);
advapi32.CloseServiceHandle(service);
}
advapi32.CloseServiceHandle(serviceManager);
}
return(success);
}
/**
* Ask the ServiceControlManager to stop the service.
* @return true on success
*/
public boolean stop() throws Exception {
Advapi32 advapi32;
Pointer serviceManager, service;
Advapi32.SERVICE_STATUS serviceStatus;
boolean success = false;
advapi32 = Advapi32.INSTANCE;
serviceManager = openServiceControlManager(null, WINNT.GENERIC_EXECUTE);
if(serviceManager != null) {
service = advapi32.OpenService(serviceManager, serviceName, WINNT.GENERIC_EXECUTE);
if(service != null) {
serviceStatus = new Advapi32.SERVICE_STATUS();
success = advapi32.ControlService(service, WINSVC.SERVICE_CONTROL_STOP, serviceStatus);
advapi32.CloseServiceHandle(service);
}
advapi32.CloseServiceHandle(serviceManager);
}
return(success);
}
/**
* Initialize the service, connect to the ServiceControlManager.
*/
public void init() {
Advapi32 advapi32;
Advapi32.SERVICE_TABLE_ENTRY entry;
serviceMain = new ServiceMain();
advapi32 = Advapi32.INSTANCE;
entry = new Advapi32.SERVICE_TABLE_ENTRY();
entry.lpServiceName = serviceName;
entry.lpServiceProc = serviceMain;
advapi32.StartServiceCtrlDispatcher(entry.toArray(2));
}
/**
* Get a handle to the ServiceControlManager.
*
* @param machine name of the machine or null for localhost
* @param access access flags
* @return handle to ServiceControlManager or null when failed
*/
private Pointer openServiceControlManager(String machine, int access) {
Pointer handle = null;
Advapi32 advapi32;
advapi32 = Advapi32.INSTANCE;
handle = advapi32.OpenSCManager(machine, null, access);
return(handle);
}
/**
* Report service status to the ServiceControlManager.
*
* @param status status
* @param win32ExitCode exit code
* @param waitHint time to wait
*/
private void reportStatus(int status, int win32ExitCode, int waitHint) {
Advapi32 advapi32;
Advapi32.SERVICE_STATUS serviceStatus;
advapi32 = Advapi32.INSTANCE;
serviceStatus = new Advapi32.SERVICE_STATUS();
serviceStatus.dwServiceType = WINNT.SERVICE_WIN32_OWN_PROCESS;
serviceStatus.dwControlsAccepted = WINSVC.SERVICE_ACCEPT_STOP | WINSVC.SERVICE_ACCEPT_SHUTDOWN;
serviceStatus.dwWin32ExitCode = win32ExitCode;
serviceStatus.dwWaitHint = waitHint;
serviceStatus.dwCurrentState = status;
advapi32.SetServiceStatus(serviceStatusHandle, serviceStatus);
}
/**
* Called when service is starting.
*/
public abstract void onStart();
/*
* Called when service should stop.
*/
public abstract void onStop();
/**
* Implementation of the service main function.
*/
private class ServiceMain implements Advapi32.SERVICE_MAIN_FUNCTION {
/**
* Called when the service is starting.
*
* @param dwArgc number of arguments
* @param lpszArgv pointer to arguments
*/
public void callback(int dwArgc, Pointer lpszArgv) {
Advapi32 advapi32;
advapi32 = Advapi32.INSTANCE;
serviceControl = new ServiceControl();
serviceStatusHandle = advapi32.RegisterServiceCtrlHandlerEx(serviceName, serviceControl, null);
reportStatus(WINSVC.SERVICE_START_PENDING, WINERROR.NO_ERROR, 3000);
reportStatus(WINSVC.SERVICE_RUNNING, WINERROR.NO_ERROR, 0);
onStart();
try {
synchronized(waitObject) {
waitObject.wait();
}
} catch (InterruptedException ex) {
}
reportStatus(WINSVC.SERVICE_STOPPED, WINERROR.NO_ERROR, 0);
// Avoid returning from ServiceMain, which will cause a crash
// See http://support.microsoft.com/kb/201349, which recommends
// having init() wait for this thread.
// Waiting on this thread in init() won't fix the crash, though.
//System.exit(0);
}
}
/**
* Implementation of the service control function.
*/
private class ServiceControl implements Advapi32.HandlerEx {
/**
* Called when the service get a control code.
*
* @param dwControl
* @param dwEventType
* @param lpEventData
* @param lpContext
*/
public int callback(int dwControl, int dwEventType, Pointer lpEventData, Pointer lpContext) {
switch(dwControl) {
case WINSVC.SERVICE_CONTROL_STOP:
case WINSVC.SERVICE_CONTROL_SHUTDOWN:
reportStatus(WINSVC.SERVICE_STOP_PENDING, WINERROR.NO_ERROR, 5000);
onStop();
synchronized(waitObject) {
waitObject.notifyAll();
}
}
return WINERROR.NO_ERROR;
}
}
}
+2
Ver Arquivo
@@ -0,0 +1,2 @@
# placeholder
+10
Ver Arquivo
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" output="build.eclipse/contrib-test-classes" path="test"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/jnalib"/>
<classpathentry kind="lib" path="/jnalib/dist/jna.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+17
Ver Arquivo
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>platform</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
+182
Ver Arquivo
@@ -0,0 +1,182 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="platform" default="default" basedir=".">
<description>Builds and tests platform-specific code.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="JnaContrib-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
<target name="-do-jar-without-manifest">
<jar jarfile="${dist.jar}" compress="${jar.compress}">
<manifest>
<attribute name="Main-Class" value="com.sun.jna.Native"/>
<attribute name="Manifest-Version" value="1.0"/>
<attribute name="Implementation-Title" value="${impl.title}"/>
<attribute name="Implementation-Vendor" value="${vendor}"/>
<attribute name="Implementation-Version" value="${impl.version}"/>
<attribute name="Specification-Title" value="${spec.title}"/>
<attribute name="Specification-Vendor" value="${spec.vendor}"/>
<attribute name="Specification-Version" value="${spec.version}"/>
<!--
OSGi Bundle attributes
See http://www.osgi.org/Specifications/Reference
-->
<attribute name="Bundle-Category" value="jni"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="jna-platform"/>
<attribute name="Bundle-Description" value="JNA Platform Library"/>
<attribute name="Bundle-SymbolicName" value="com.sun.jna.platform"/>
<attribute name="Bundle-Version" value="${osgi.version}"/>
<attribute name="Bundle-RequiredExecutionEnvironment" value="J2SE-1.4"/>
<attribute name="Bundle-Vendor" value="${vendor}"/>
<attribute name="Require-Bundle" value="com.sun.jna;bundle-version=&quot;${osgi.version}&quot;"/>
<attribute name="Export-Package"
value="
com.sun.jna.platform,
com.sun.jna.platform.dnd,
com.sun.jna.platform.mac,
com.sun.jna.platform.unix,
com.sun.jna.platform.win32,
com.sun.jna.platform.win32.COM,
com.sun.jna.platform.win32.COM.tlb,
com.sun.jna.platform.win32.COM.tlb.imp,
com.sun.jna.platform.wince
"/>
</manifest>
<fileset dir="${build.classes.dir}"/>
</jar>
</target>
<target name="test" depends="init,compile,compile-test,-pre-test-run" description="Run platform unit tests.">
<echo>Running platform tests: ${test.src.dir}</echo>
<property name="test.fork" value="yes"/>
<property name="build.test.results.dir.abs" location="${build.test.results.dir}"/>
<mkdir dir="${build.test.results.dir.abs}"/>
<echo>Saving test results in ${build.test.results.dir.abs}</echo>
<condition property="tests.platform" value="**/mac/**">
<os family="mac"/>
</condition>
<condition property="tests.platform" value="**/win32/**">
<os family="windows"/>
</condition>
<condition property="tests.platform" value="**/unix/**">
<os family="unix"/>
</condition>
<property name="tests.platform" value=""/>
<property name="tests.exclude" value=""/>
<property name="tests.exclude-patterns" value=""/>
<condition property="java.awt.headless" value="true">
<isset property="headless"/>
</condition>
<condition property="vmopt.arch" value="-d64" else="-Dignore">
<and>
<!-- Sun 64-bit VM for windows doesn't support the -d64 switch -->
<not><os family="windows"/></not>
<equals arg1="${vm.arch}" arg2="-d64" trim="true"/>
</and>
</condition>
<propertyset id="headless">
<propertyref prefix="java.awt.headless"/>
</propertyset>
<echo>tests.platform=${tests.platform}</echo>
<junit fork="${test.fork}" failureproperty="testfailure" tempdir="${build.dir}">
<!-- optionally run headless -->
<syspropertyset refid="headless"/>
<!-- avoid VM conflicts with JNA protected mode -->
<env key="${ld.preload.name}" file="${libjsig}"/>
<!-- Ignore any system install of JNA -->
<sysproperty key="jna.nosys" value="true"/>
<!-- Avoid VM crashes, if possible -->
<sysproperty key="jna.protected" value="true"/>
<sysproperty key="jna.builddir" file="${file.reference.jna.build}"/>
<jvmarg value="${vmopt.arch}"/>
<classpath><path path="${run.test.classpath}"/><path path="${file.reference.jna.build}/test-classes"/></classpath>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<batchtest todir="${build.test.results.dir}">
<fileset dir="${test.src.dir}" excludes="${tests.exclude-patterns}">
<!-- Until StructureFieldOrderTest gets fixed up a little -->
<exclude name="**/StructureFieldOrderTest.java"/>
<include name="com/sun/jna/platform/*Test.java"/>
<include name="${tests.platform}"/>
<exclude name="${tests.exclude}"/>
</fileset>
</batchtest>
</junit>
<junitreport todir="${build.test.results.dir}">
<fileset dir="${build.test.results.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report todir="${build.test.results.dir}"/>
</junitreport>
<echo message="View test report in file://${build.test.results.dir.abs}/index.html" />
<fail if="testfailure">One or more tests failed</fail>
</target>
<!-- One-off test to check field order definitions -->
<target name="test-field-order" depends="-pre-test-run-single" >
<!-- @todo How to ensure sys prop: jna.nosys=true is seen in tests? -->
<!--<property name="test.includes" value="com/sun/jna/platform/**/*.java"/>-->
<property name="test.includes" value="com/sun/jna/platform/StructureFieldOrderTest.java"/>
<property name="javac.includes" value="**/*"/>
<antcall target="test-single"/>
</target>
</project>
+541
Ver Arquivo
@@ -0,0 +1,541 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
*** GENERATED FROM project.xml - DO NOT EDIT ***
*** EDIT ../build.xml INSTEAD ***
For the purpose of easier reading the script
is divided into following sections:
- initialization
- compilation
- jar
- execution
- debugging
- javadoc
- junit compilation
- junit execution
- junit debugging
- applet
- cleanup
-->
<project name="platform-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
<target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
<!--
======================
INITIALIZATION SECTION
======================
-->
<target name="-pre-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="-init-private" depends="-pre-init">
<property file="nbproject/private/private.properties"/>
</target>
<target name="-init-user" depends="-pre-init,-init-private">
<property file="${user.properties.file}"/>
<!-- The two properties below are usually overridden -->
<!-- by the active platform. Just a fallback. -->
<property name="default.javac.source" value="1.4"/>
<property name="default.javac.target" value="1.4"/>
</target>
<target name="-init-project" depends="-pre-init,-init-private,-init-user">
<property file="nbproject/project.properties"/>
</target>
<target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
<available file="${manifest.file}" property="manifest.available"/>
<condition property="manifest.available+main.class">
<and>
<isset property="manifest.available"/>
<isset property="main.class"/>
<not>
<equals arg1="${main.class}" arg2="" trim="true"/>
</not>
</and>
</condition>
<condition property="manifest.available+main.class+mkdist.available">
<and>
<istrue value="${manifest.available+main.class}"/>
<isset property="libs.CopyLibs.classpath"/>
</and>
</condition>
<condition property="have.tests">
<or>
<available file="${test.src.dir}"/>
</or>
</condition>
<condition property="have.sources">
<or>
<available file="${src.dir}"/>
</or>
</condition>
<condition property="netbeans.home+have.tests">
<and>
<isset property="netbeans.home"/>
<isset property="have.tests"/>
</and>
</condition>
<condition property="no.javadoc.preview">
<isfalse value="${javadoc.preview}"/>
</condition>
<property name="run.jvmargs" value=""/>
<property name="javac.compilerargs" value=""/>
<property name="work.dir" value="${basedir}"/>
<condition property="no.deps">
<and>
<istrue value="${no.dependencies}"/>
</and>
</condition>
<property name="javac.debug" value="true"/>
<property name="javadoc.preview" value="true"/>
</target>
<target name="-post-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="test.src.dir">Must set test.src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
<fail unless="dist.dir">Must set dist.dir</fail>
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
<fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
<fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
<fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
<fail unless="dist.jar">Must set dist.jar</fail>
</target>
<target name="-init-macrodef-property">
<macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute name="name"/>
<attribute name="value"/>
<sequential>
<property name="@{name}" value="${@{value}}"/>
</sequential>
</macrodef>
</target>
<target name="-init-macrodef-javac">
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute name="srcdir" default="${src.dir}"/>
<attribute name="destdir" default="${build.classes.dir}"/>
<attribute name="classpath" default="${javac.classpath}"/>
<attribute name="debug" default="${javac.debug}"/>
<element name="customize" optional="true"/>
<sequential>
<javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
<classpath>
<path path="@{classpath}"/>
</classpath>
<compilerarg line="${javac.compilerargs}"/>
<customize/>
</javac>
</sequential>
</macrodef>
</target>
<target name="-init-macrodef-junit">
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute name="includes" default="**/*Test.java"/>
<sequential>
<junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
<batchtest todir="${build.test.results.dir}">
<fileset dir="${test.src.dir}" includes="@{includes}"/>
</batchtest>
<classpath>
<path path="${run.test.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
<mapper type="glob" from="test-sys-prop.*" to="*"/>
</syspropertyset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<jvmarg line="${run.jvmargs}"/>
</junit>
</sequential>
</macrodef>
</target>
<target name="-init-macrodef-nbjpda">
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute name="name" default="${main.class}"/>
<attribute name="classpath" default="${debug.classpath}"/>
<attribute name="stopclassname" default=""/>
<sequential>
<nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
<classpath>
<path path="@{classpath}"/>
</classpath>
</nbjpdastart>
</sequential>
</macrodef>
<macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute name="dir" default="${build.classes.dir}"/>
<sequential>
<nbjpdareload>
<fileset includes="${fix.includes}*.class" dir="@{dir}"/>
</nbjpdareload>
</sequential>
</macrodef>
</target>
<target name="-init-macrodef-debug">
<macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute name="classname" default="${main.class}"/>
<attribute name="classpath" default="${debug.classpath}"/>
<element name="customize" optional="true"/>
<sequential>
<java fork="true" classname="@{classname}" dir="${work.dir}">
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xnoagent"/>
<jvmarg value="-Djava.compiler=none"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
<jvmarg line="${run.jvmargs}"/>
<classpath>
<path path="@{classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
<mapper type="glob" from="run-sys-prop.*" to="*"/>
</syspropertyset>
<customize/>
</java>
</sequential>
</macrodef>
</target>
<target name="-init-macrodef-java">
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute name="classname" default="${main.class}"/>
<element name="customize" optional="true"/>
<sequential>
<java fork="true" classname="@{classname}" dir="${work.dir}">
<jvmarg line="${run.jvmargs}"/>
<classpath>
<path path="${run.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
<mapper type="glob" from="run-sys-prop.*" to="*"/>
</syspropertyset>
<customize/>
</java>
</sequential>
</macrodef>
</target>
<target name="-init-presetdef-jar">
<presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
<jar jarfile="${dist.jar}" compress="${jar.compress}">
<j2seproject1:fileset dir="${build.classes.dir}"/>
</jar>
</presetdef>
</target>
<target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
<!--
===================
COMPILATION SECTION
===================
-->
<target name="deps-jar" depends="init" unless="no.deps"/>
<target name="-pre-pre-compile" depends="init,deps-jar">
<mkdir dir="${build.classes.dir}"/>
</target>
<target name="-pre-compile">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
<j2seproject3:javac/>
<copy todir="${build.classes.dir}">
<fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
</copy>
</target>
<target name="-post-compile">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
<target name="-pre-compile-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
<j2seproject3:javac>
<customize>
<patternset includes="${javac.includes}"/>
</customize>
</j2seproject3:javac>
</target>
<target name="-post-compile-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
<!--
====================
JAR BUILDING SECTION
====================
-->
<target name="-pre-pre-jar" depends="init">
<dirname property="dist.jar.dir" file="${dist.jar}"/>
<mkdir dir="${dist.jar.dir}"/>
</target>
<target name="-pre-jar">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
<j2seproject1:jar/>
</target>
<target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
<j2seproject1:jar manifest="${manifest.file}"/>
</target>
<target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
<j2seproject1:jar manifest="${manifest.file}">
<j2seproject1:manifest>
<j2seproject1:attribute name="Main-Class" value="${main.class}"/>
</j2seproject1:manifest>
</j2seproject1:jar>
<echo>To run this application from the command line without Ant, try:</echo>
<property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
<property name="dist.jar.resolved" location="${dist.jar}"/>
<pathconvert property="run.classpath.with.dist.jar">
<path path="${run.classpath}"/>
<map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
</pathconvert>
<echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
</target>
<target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
<property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
<pathconvert property="run.classpath.without.build.classes.dir">
<path path="${run.classpath}"/>
<map from="${build.classes.dir.resolved}" to=""/>
</pathconvert>
<pathconvert property="jar.classpath" pathsep=" ">
<path path="${run.classpath.without.build.classes.dir}"/>
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="lib/*"/>
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
<copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
</manifest>
</copylibs>
<echo>To run this application from the command line without Ant, try:</echo>
<property name="dist.jar.resolved" location="${dist.jar}"/>
<echo>java -jar "${dist.jar.resolved}"</echo>
</target>
<target name="-post-jar">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
<!--
=================
EXECUTION SECTION
=================
-->
<target name="run" depends="init,compile" description="Run a main class.">
<j2seproject1:java>
<customize>
<arg line="${application.args}"/>
</customize>
</j2seproject1:java>
</target>
<target name="run-single" depends="init,compile-single">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<j2seproject1:java classname="${run.class}"/>
</target>
<!--
=================
DEBUGGING SECTION
=================
-->
<target name="-debug-start-debugger" if="netbeans.home" depends="init">
<j2seproject1:nbjpdastart name="${debug.class}"/>
</target>
<target name="-debug-start-debuggee" depends="init,compile">
<j2seproject3:debug>
<customize>
<arg line="${application.args}"/>
</customize>
</j2seproject3:debug>
</target>
<target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
<target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
<j2seproject1:nbjpdastart stopclassname="${main.class}"/>
</target>
<target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
<target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
<j2seproject3:debug classname="${debug.class}"/>
</target>
<target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
<target name="-pre-debug-fix" depends="init">
<fail unless="fix.includes">Must set fix.includes</fail>
<property name="javac.includes" value="${fix.includes}.java"/>
</target>
<target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
<j2seproject1:nbjpdareload/>
</target>
<target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
<!--
===============
JAVADOC SECTION
===============
-->
<target name="-javadoc-build" depends="init">
<mkdir dir="${dist.javadoc.dir}"/>
<javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
<classpath>
<path path="${javac.classpath}"/>
</classpath>
<sourcepath>
<pathelement location="${src.dir}"/>
</sourcepath>
<packageset dir="${src.dir}" includes="*/**"/>
<fileset dir="${src.dir}" includes="*.java"/>
</javadoc>
</target>
<target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
<nbbrowse file="${dist.javadoc.dir}/index.html"/>
</target>
<target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
<!--
=========================
JUNIT COMPILATION SECTION
=========================
-->
<target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
<mkdir dir="${build.test.classes.dir}"/>
</target>
<target name="-pre-compile-test">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
<j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
<copy todir="${build.test.classes.dir}">
<fileset dir="${test.src.dir}" excludes="**/*.java"/>
</copy>
</target>
<target name="-post-compile-test">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
<target name="-pre-compile-test-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
<j2seproject3:javac srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
<customize>
<patternset includes="${javac.includes}"/>
</customize>
</j2seproject3:javac>
<copy todir="${build.test.classes.dir}">
<fileset dir="${test.src.dir}" excludes="**/*.java"/>
</copy>
</target>
<target name="-post-compile-test-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
<!--
=======================
JUNIT EXECUTION SECTION
=======================
-->
<target name="-pre-test-run" if="have.tests" depends="init">
<mkdir dir="${build.test.results.dir}"/>
</target>
<target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
<j2seproject3:junit/>
</target>
<target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
<fail if="tests.failed">Some tests failed; see details above.</fail>
</target>
<target name="test-report" if="have.tests" depends="init"/>
<target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
<target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
<target name="-pre-test-run-single" if="have.tests" depends="init">
<mkdir dir="${build.test.results.dir}"/>
</target>
<target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
<j2seproject3:junit includes="${test.includes}"/>
</target>
<target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
<fail if="tests.failed">Some tests failed; see details above.</fail>
</target>
<target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
<!--
=======================
JUNIT DEBUGGING SECTION
=======================
-->
<target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
<j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
<customize>
<arg line="${test.class}"/>
</customize>
</j2seproject3:debug>
</target>
<target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
<j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
</target>
<target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
<target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
</target>
<target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
<!--
=========================
APPLET EXECUTION SECTION
=========================
-->
<target name="run-applet" depends="init,compile-single">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
<j2seproject1:java classname="sun.applet.AppletViewer">
<customize>
<arg value="${applet.url}"/>
</customize>
</j2seproject1:java>
</target>
<!--
=========================
APPLET DEBUGGING SECTION
=========================
-->
<target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
<j2seproject3:debug classname="sun.applet.AppletViewer">
<customize>
<arg value="${applet.url}"/>
</customize>
</j2seproject3:debug>
</target>
<target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
<!--
===============
CLEANUP SECTION
===============
-->
<target name="deps-clean" depends="init" unless="no.deps"/>
<target name="-do-clean" depends="init">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="-post-clean">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
</project>
@@ -0,0 +1,67 @@
application.args=
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/jna-platform.jar
dist.javadoc.dir=${dist.dir}/javadoc
file.reference.jna.jar=../../build/jna.jar
file.reference.jna-test.jar=../../build/jna-test.jar
libs.junit.classpath=../../lib/junit.jar
jar.compress=false
javac.classpath=\
${file.reference.jna.jar}:\
${file.reference.jna.build}/test-classes
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.source=1.5
javac.target=1.5
javac.test.classpath=\
${javac.classpath}:\
${file.reference.jna-test.jar}:\
${build.classes.dir}:\
${libs.junit.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
../../lib/test/reflections-0.9.8.jar:\
../../lib/test/guava-11.0.2.jar:\
../../lib/test/javassist-3.12.1.GA.jar:\
../../lib/test/slf4j-api-1.6.1.jar:\
../../lib/test/dom4j-1.6.1.jar:\
${build.test.classes.dir}
src.dir=src
test.src.dir=test
+16
Ver Arquivo
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>platform</name>
<minimum-ant-version>1.6.5</minimum-ant-version>
<source-roots>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>
</project>
+13
Ver Arquivo
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
@@ -0,0 +1,62 @@
/*
* Copyright 2014 Martin Steiger
*
* 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 com.sun.jna.platform;
import com.sun.jna.FromNativeContext;
import com.sun.jna.ToNativeContext;
import com.sun.jna.TypeConverter;
/**
* A {@link TypeConverter} that maps an integer enum value to
* an actual Java enum.
* @param <T> the enum type
* @author Martin Steiger
*/
public class EnumConverter<T extends Enum<T>> implements TypeConverter {
private final Class<T> clazz;
/**
* @param clazz the enum class
*/
public EnumConverter(Class<T> clazz)
{
this.clazz = clazz;
}
@Override
public T fromNative(Object input, FromNativeContext context) {
Integer i = (Integer) input;
T[] vals = clazz.getEnumConstants();
return vals[i];
}
@Override
public Integer toNative(Object input, ToNativeContext context) {
T t = clazz.cast(input);
return Integer.valueOf(t.ordinal());
}
@Override
public Class<Integer> nativeType() {
return Integer.class;
}
}
@@ -0,0 +1,105 @@
/*
* Copyright 2014 Martin Steiger
*
* 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 com.sun.jna.platform;
import java.util.HashSet;
import java.util.Set;
import com.sun.jna.platform.win32.FlagEnum;
/**
* Several helper methods to convert integer flag (sets)
* into enum (sets)
* @author Martin Steiger
*/
public class EnumUtils
{
/**
* Uninitialized integer flag
*/
public static final int UNINITIALIZED = -1;
/**
* @param val the enum
* @return the index of the enum in the enum list
*/
public static <E extends Enum<E>> int toInteger(E val)
{
@SuppressWarnings("unchecked")
E[] vals = (E[]) val.getClass().getEnumConstants();
for (int idx = 0; idx < vals.length; idx++)
{
if (vals[idx] == val)
return idx;
}
throw new IllegalArgumentException();
}
/**
* @param idx the enum index
* @param clazz the enum class
* @return the enum at position idx
*/
public static <E extends Enum<E>> E fromInteger(int idx, Class<E> clazz)
{
if (idx == UNINITIALIZED)
return null;
E[] vals = clazz.getEnumConstants();
return vals[idx];
}
/**
* @param flags the ORed flags
* @param clazz the enum class
* @return the representing set
*/
public static <T extends FlagEnum> Set<T> setFromInteger(int flags, Class<T> clazz)
{
T[] vals = clazz.getEnumConstants();
Set<T> result = new HashSet<T>();
for (T val : vals)
{
if ((flags & val.getFlag()) != 0)
{
result.add(val);
}
}
return result;
}
/**
* @param set the set to convert
* @return the flags combined into an integer
*/
public static <T extends FlagEnum> int setToInteger(Set<T> set) {
int sum = 0;
for (T t : set)
{
sum |= t.getFlag();
}
return sum;
}
}
@@ -0,0 +1,135 @@
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* <p/>
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.sun.jna.platform.win32.W32FileMonitor;
/** Provides notification of file system changes. Actual capabilities may
* vary slightly by platform.
* <p>
* Watched files which are removed from the filesystem are no longer watched.
* @author twall
*/
@SuppressWarnings("serial")
public abstract class FileMonitor {
public static final int FILE_CREATED = 0x1;
public static final int FILE_DELETED = 0x2;
public static final int FILE_MODIFIED = 0x4;
public static final int FILE_ACCESSED = 0x8;
public static final int FILE_NAME_CHANGED_OLD = 0x10;
public static final int FILE_NAME_CHANGED_NEW = 0x20;
public static final int FILE_RENAMED = FILE_NAME_CHANGED_OLD|FILE_NAME_CHANGED_NEW;
public static final int FILE_SIZE_CHANGED = 0x40;
public static final int FILE_ATTRIBUTES_CHANGED = 0x80;
public static final int FILE_SECURITY_CHANGED = 0x100;
public static final int FILE_ANY = 0x1FF;
public interface FileListener {
public void fileChanged(FileEvent e);
}
public class FileEvent extends EventObject {
private final File file;
private final int type;
public FileEvent(File file, int type) {
super(FileMonitor.this);
this.file = file;
this.type = type;
}
public File getFile() { return file; }
public int getType() { return type; }
public String toString() {
return "FileEvent: " + file + ":" + type;
}
}
private final Map<File, Integer> watched = new HashMap<File, Integer>();
private List<FileListener> listeners = new ArrayList<FileListener>();
protected abstract void watch(File file, int mask, boolean recursive) throws IOException ;
protected abstract void unwatch(File file);
public abstract void dispose();
public void addWatch(File dir) throws IOException {
addWatch(dir, FILE_ANY);
}
public void addWatch(File dir, int mask) throws IOException {
addWatch(dir, mask, dir.isDirectory());
}
public void addWatch(File dir, int mask, boolean recursive) throws IOException {
watched.put(dir, new Integer(mask));
watch(dir, mask, recursive);
}
public void removeWatch(File file) {
if (watched.remove(file) != null) {
unwatch(file);
}
}
protected void notify(FileEvent e) {
for (FileListener listener : listeners) {
listener.fileChanged(e);
}
}
public synchronized void addFileListener(FileListener listener) {
List<FileListener> list = new ArrayList<FileListener>(listeners);
list.add(listener);
listeners = list;
}
public synchronized void removeFileListener(FileListener x) {
List<FileListener> list = new ArrayList<FileListener>(listeners);
list.remove(x);
listeners = list;
}
protected void finalize() {
for (File watchedFile : watched.keySet()) {
removeWatch(watchedFile);
}
dispose();
}
/** Canonical lazy loading of a singleton. */
private static class Holder {
public static final FileMonitor INSTANCE;
static {
String os = System.getProperty("os.name");
if (os.startsWith("Windows")) {
INSTANCE = new W32FileMonitor();
}
else {
throw new Error("FileMonitor not implemented for " + os);
}
}
}
public static FileMonitor getInstance() {
return Holder.INSTANCE;
}
}
@@ -10,19 +10,27 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.examples;
package com.sun.jna.platform;
import java.io.File;
import com.sun.jna.examples.win32.Shell32;
import com.sun.jna.examples.win32.Shell32.SHFILEOPSTRUCT;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.sun.jna.platform.mac.MacFileUtils;
import com.sun.jna.platform.win32.W32FileUtils;
/** Miscellaneous file utils not provided for by Java. */
public abstract class FileUtils {
public boolean hasTrash() {
return false;
}
/** Move the given file to the system trash, if one is available.
Returns whether the operation was successful.
Throws an exception on failure.
*/
public abstract boolean moveToTrash(File[] files);
public abstract void moveToTrash(File[] files) throws IOException;
/** Canonical lazy loading of a singleton. */
private static class Holder {
@@ -43,49 +51,11 @@ public abstract class FileUtils {
public static FileUtils getInstance() {
return Holder.INSTANCE;
}
private static class W32FileUtils extends FileUtils {
public boolean moveToTrash(File[] files) {
Shell32 shell = Shell32.INSTANCE;
SHFILEOPSTRUCT fileop = new SHFILEOPSTRUCT();
fileop.wFunc = Shell32.FO_DELETE;
String[] paths = new String[files.length];
for (int i=0;i < paths.length;i++) {
paths[i] = files[i].getAbsolutePath();
}
fileop.pFrom = fileop.encodePaths(paths);
fileop.fFlags = Shell32.FOF_ALLOWUNDO|Shell32.FOF_NOCONFIRMATION|Shell32.FOF_SILENT;
return shell.SHFileOperation(fileop) == 0;
}
}
private static class MacFileUtils extends FileUtils {
public boolean moveToTrash(File[] files) {
// TODO: account for stuff not on the same volume
// Also should suffix file by time moved to trash
File home = new File(System.getProperty("user.home"));
File trash = new File(home, ".Trash");
if (trash.exists()) {
boolean success = true;
for (int i=0;i < files.length;i++) {
File src = files[i];
File target = new File(trash, src.getName());
if (!src.renameTo(target)) {
success = false;
}
}
return success;
}
return false;
}
}
}
private static class DefaultFileUtils extends FileUtils {
/** The default implementation attempts to move the file to
* the desktop "Trash" folder.
*/
public boolean moveToTrash(File[] files) {
private File getTrashDirectory() {
// very simple implementation. should take care of renaming when
// a file already exists, or any other platform-specific behavior
File home = new File(System.getProperty("user.home"));
@@ -98,21 +68,39 @@ public abstract class FileUtils {
trash = new File(desktop, ".Trash");
if (!trash.exists()) {
trash = new File(desktop, "Trash");
if (!trash.exists()) {
trash = new File(System.getProperty("fileutils.trash", "Trash"));
}
}
}
}
}
if (trash.exists()) {
boolean success = true;
for (int i=0;i < files.length;i++) {
File src = files[i];
File target = new File(trash, src.getName());
if (!src.renameTo(target))
success = false;
}
return success;
return trash;
}
public boolean hasTrash() {
return getTrashDirectory().exists();
}
/** The default implementation attempts to move the file to
* the desktop "Trash" folder.
*/
public void moveToTrash(File[] files) throws IOException {
File trash = getTrashDirectory();
if (!trash.exists()) {
throw new IOException("No trash location found (define fileutils.trash to be the path to the trash)");
}
List<File> failed = new ArrayList<File>();
for (int i=0;i < files.length;i++) {
File src = files[i];
File target = new File(trash, src.getName());
if (!src.renameTo(target)) {
failed.add(src);
}
}
if (failed.size() > 0) {
throw new IOException("The following files could not be trashed: " + failed);
}
return false;
}
}
}
@@ -10,15 +10,17 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.examples;
package com.sun.jna.platform;
import java.awt.GraphicsEnvironment;
import java.awt.HeadlessException;
import java.awt.event.KeyEvent;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.examples.unix.X11;
import com.sun.jna.examples.win32.User32;
import com.sun.jna.Platform;
import com.sun.jna.platform.unix.X11;
import com.sun.jna.platform.unix.X11.Display;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinUser;
/** Provide access to the local keyboard state. Note that this is meaningless
* on a headless system and some VNC setups.
@@ -35,19 +37,16 @@ public class KeyboardUtils {
if (GraphicsEnvironment.isHeadless()) {
throw new HeadlessException("KeyboardUtils requires a keyboard");
}
String os = System.getProperty("os.name");
if (os.startsWith("Windows")) {
if (Platform.isWindows()) {
INSTANCE = new W32KeyboardUtils();
}
else if (os.startsWith("Mac")) {
else if (Platform.isMac()) {
INSTANCE = new MacKeyboardUtils();
throw new UnsupportedOperationException("No support (yet) for " + os);
}
else if (os.startsWith("Linux") || os.startsWith("SunOS")) {
INSTANCE = new X11KeyboardUtils();
throw new UnsupportedOperationException("No support (yet) for "
+ System.getProperty("os.name"));
}
else {
throw new UnsupportedOperationException("No support for " + os);
INSTANCE = new X11KeyboardUtils();
}
}
@@ -73,30 +72,30 @@ public class KeyboardUtils {
}
if (code == KeyEvent.VK_SHIFT) {
if ((loc & KeyEvent.KEY_LOCATION_RIGHT) != 0) {
return User32.VK_RSHIFT;
return WinUser.VK_RSHIFT;
}
if ((loc & KeyEvent.KEY_LOCATION_LEFT) != 0) {
return User32.VK_LSHIFT;
return WinUser.VK_LSHIFT;
}
return User32.VK_SHIFT;
return WinUser.VK_SHIFT;
}
if (code == KeyEvent.VK_CONTROL) {
if ((loc & KeyEvent.KEY_LOCATION_RIGHT) != 0) {
return User32.VK_RCONTROL;
return WinUser.VK_RCONTROL;
}
if ((loc & KeyEvent.KEY_LOCATION_LEFT) != 0) {
return User32.VK_LCONTROL;
return WinUser.VK_LCONTROL;
}
return User32.VK_CONTROL;
return WinUser.VK_CONTROL;
}
if (code == KeyEvent.VK_ALT) {
if ((loc & KeyEvent.KEY_LOCATION_RIGHT) != 0) {
return User32.VK_RMENU;
return WinUser.VK_RMENU;
}
if ((loc & KeyEvent.KEY_LOCATION_LEFT) != 0) {
return User32.VK_LMENU;
return WinUser.VK_LMENU;
}
return User32.VK_MENU;
return WinUser.VK_MENU;
}
return 0;
}
@@ -111,7 +110,7 @@ public class KeyboardUtils {
}
}
private static class X11KeyboardUtils extends NativeKeyboardUtils {
// TODO: map from X11 keycodes to java keycodes
// TODO: fully map from X11 keycodes to java keycodes
// this is a minimal implementation
private int toKeySym(int code, int location) {
if (code >= KeyEvent.VK_A && code <= KeyEvent.VK_Z)
@@ -142,25 +141,22 @@ public class KeyboardUtils {
}
public boolean isPressed(int keycode, int location) {
X11 lib = X11.INSTANCE;
Pointer dpy = lib.XOpenDisplay(null);
Display dpy = lib.XOpenDisplay(null);
if (dpy == null) {
throw new Error("Can't open X Display");
}
try {
byte[] keys = new byte[32];
int result = lib.XQueryKeymap(dpy, keys);
if (result != 0) {
byte[] buf = new byte[1024];
lib.XGetErrorText(dpy, result, buf, buf.length);
throw new RuntimeException("Can't query keyboard: " + Native.toString(buf));
}
else {
int keysym = toKeySym(keycode, location);
for (int code=5;code < 256;code++) {
int idx = code / 8;
int shift = code % 8;
if ((keys[idx] & (1 << shift)) != 0) {
int sym = lib.XKeycodeToKeysym(dpy, (byte)code, 0);
if (sym == keysym)
return true;
}
// Ignore the return value
lib.XQueryKeymap(dpy, keys);
int keysym = toKeySym(keycode, location);
for (int code=5;code < 256;code++) {
int idx = code / 8;
int shift = code % 8;
if ((keys[idx] & (1 << shift)) != 0) {
int sym = lib.XKeycodeToKeysym(dpy, (byte)code, 0).intValue();
if (sym == keysym)
return true;
}
}
}
@@ -1,16 +1,17 @@
/* Copyright (c) 2007 Olivier Chafik, All Rights Reserved
*
* Copyright (c) 2008 Timothy Wall, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* Lesser General Public License for more details.
*/
package com.sun.jna.examples;
package com.sun.jna.platform;
import java.awt.Rectangle;
import java.awt.image.DataBuffer;
@@ -20,10 +21,16 @@ import java.awt.image.MultiPixelPackedSampleModel;
import java.awt.image.Raster;
import java.awt.image.SampleModel;
import java.awt.image.SinglePixelPackedSampleModel;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;
/**
* Methods that are useful to decompose a raster in ranges of contiguous unoccupied pixels.
* An occupied pixel has two possible meanings, depending on the raster :
* Methods that are useful to decompose a raster into a set of rectangles.
* An occupied pixel has two possible meanings, depending on the raster :
* <ul>
* <li>if the raster has an alpha layer, occupied means with alpha not null</li>
* <li>if the raster doesn't have any alpha layer, occupied means not completely black</li>
@@ -31,12 +38,18 @@ import java.awt.image.SinglePixelPackedSampleModel;
* @author Olivier Chafik
*/
public class RasterRangesUtils {
/// Masks used to isolate the current column in a set of 8 binary columns packed in a byte
/// Masks used to isolate the current column in a set of 8 binary columns packed in a byte
private static final int[] subColMasks = new int[] {
0x0080, 0x0040, 0x0020, 0x0010,
0x0008, 0x0004, 0x0002, 0x0001
};
private static final Comparator<Object> COMPARATOR = new Comparator<Object>() {
public int compare(Object o1, Object o2) {
return ((Rectangle)o1).x - ((Rectangle)o2).x;
}
};
/**
* Abstraction of a sink for ranges.
*/
@@ -45,13 +58,13 @@ public class RasterRangesUtils {
* Output a rectangular range.
* @param x x coordinate of the top-left corner of the range
* @param y y coordinate of the top-left corner of the range
* @param w witdh of the range
* @param w width of the range
* @param h height of the range
* @return true if the output succeeded, false otherwise
*/
public boolean outputRange(int x, int y, int w, int h);
boolean outputRange(int x, int y, int w, int h);
}
/**
* Outputs ranges of occupied pixels.
* In a raster that has an alpha layer, a pixel is occupied if its alpha value is not null.
@@ -64,15 +77,15 @@ public class RasterRangesUtils {
Rectangle bounds = raster.getBounds();
SampleModel sampleModel = raster.getSampleModel();
boolean hasAlpha = sampleModel.getNumBands() == 4;
// Try to use the underlying data array directly for a few common raster formats
if (raster.getParent() == null && bounds.x == 0 && bounds.y == 0) {
// No support for subraster (as obtained with Image.getSubimage(...))
DataBuffer data = raster.getDataBuffer();
if (data.getNumBanks() == 1) {
// There is always a single bank for all BufferedImage types, except maybe TYPE_CUSTOM
if (sampleModel instanceof MultiPixelPackedSampleModel) {
MultiPixelPackedSampleModel packedSampleModel = (MultiPixelPackedSampleModel)sampleModel;
if (packedSampleModel.getPixelBitStride() == 1) {
@@ -93,18 +106,21 @@ public class RasterRangesUtils {
int[] pixels = raster.getPixels(0, 0, bounds.width, bounds.height, (int[])null);
return outputOccupiedRanges(pixels, bounds.width, bounds.height, hasAlpha ? 0xff000000 : 0xffffff, out);
}
/**
* Output the non-null values of a binary image as ranges of contiguous values.
* @param binaryBits byte-packed binary bits of an image
* @param w width of the image (in pixels)
* @param h height of the image
* @param output
* @param out
* @return true if the output succeeded, false otherwise
*/
public static boolean outputOccupiedRangesOfBinaryPixels(byte[] binaryBits, int w, int h, RangesOutput output) {
public static boolean outputOccupiedRangesOfBinaryPixels(byte[] binaryBits, int w, int h, RangesOutput out) {
Set<Rectangle> rects = new HashSet<Rectangle>();
Set<Rectangle> prevLine = Collections.EMPTY_SET;
int scanlineBytes = binaryBits.length / h;
for (int row = 0; row < h; row++) {
Set<Rectangle> curLine = new TreeSet<Rectangle>(COMPARATOR);
int rowOffsetBytes = row * scanlineBytes;
int startCol = -1;
// Look at each batch of 8 columns in this row
@@ -115,9 +131,7 @@ public class RasterRangesUtils {
// all 8 bits are zeroes
if (startCol >= 0) {
// end of current region
if (!output.outputRange(startCol, row, firstByteCol - startCol, 1)) {
return false;
}
curLine.add(new Rectangle(startCol, row, firstByteCol - startCol, 1));
startCol = -1;
}
} else if (byteColBits == 0xff) {
@@ -138,9 +152,7 @@ public class RasterRangesUtils {
} else {
if (startCol >= 0) {
// end of current region
if (!output.outputRange(startCol, row, col - startCol, 1)) {
return false;
}
curLine.add(new Rectangle(startCol, row, col - startCol, 1));
startCol = -1;
}
}
@@ -149,15 +161,23 @@ public class RasterRangesUtils {
}
if (startCol >= 0) {
// end of last region
if (!output.outputRange(startCol, row, w - startCol, 1)) {
return false;
}
startCol = -1;
curLine.add(new Rectangle(startCol, row, w - startCol, 1));
}
Set<Rectangle> unmerged = mergeRects(prevLine, curLine);
rects.addAll(unmerged);
prevLine = curLine;
}
// Add anything left over
rects.addAll(prevLine);
for (Iterator<Rectangle> i=rects.iterator();i.hasNext();) {
Rectangle r = i.next();
if (!out.outputRange(r.x, r.y, r.width, r.height)) {
return false;
}
}
return true;
}
/**
* Output the occupied values of an integer-pixels image as ranges of contiguous values.
* A pixel is considered occupied if the bitwise AND of its integer value with the provided occupationMask is not null.
@@ -169,11 +189,13 @@ public class RasterRangesUtils {
* @return true if the output succeeded, false otherwise
*/
public static boolean outputOccupiedRanges(int[] pixels, int w, int h, int occupationMask, RangesOutput out) {
Set<Rectangle> rects = new HashSet<Rectangle>();
Set<Rectangle> prevLine = Collections.EMPTY_SET;
for (int row = 0; row < h; row++) {
Set<Rectangle> curLine = new TreeSet<Rectangle>(COMPARATOR);
int idxOffset = row * w;
int startCol = -1;
for (int col = 0; col < w; col++) {
if ((pixels[idxOffset + col] & occupationMask) != 0) {
if (startCol < 0) {
@@ -182,21 +204,55 @@ public class RasterRangesUtils {
} else {
if (startCol >= 0) {
// end of current region
if (!out.outputRange(startCol, row, col - startCol, 1)) {
return false;
}
curLine.add(new Rectangle(startCol, row, col-startCol, 1));
startCol = -1;
}
}
}
if (startCol >= 0) {
// end of last region of current row
if (!out.outputRange(startCol, row, w - startCol, 1)) {
return false;
}
startCol = -1;
curLine.add(new Rectangle(startCol, row, w-startCol, 1));
}
Set<Rectangle> unmerged = mergeRects(prevLine, curLine);
rects.addAll(unmerged);
prevLine = curLine;
}
// Add anything left over
rects.addAll(prevLine);
for (Iterator<Rectangle> i=rects.iterator();i.hasNext();) {
Rectangle r = i.next();
if (!out.outputRange(r.x, r.y, r.width, r.height)) {
return false;
}
}
return true;
}
private static Set<Rectangle> mergeRects(Set<Rectangle> prev, Set<Rectangle> current) {
Set<Rectangle> unmerged = new HashSet<Rectangle>(prev);
if (!prev.isEmpty() && !current.isEmpty()) {
Rectangle[] pr = prev.toArray(new Rectangle[prev.size()]);
Rectangle[] cr = current.toArray(new Rectangle[current.size()]);
int ipr = 0;
int icr = 0;
while (ipr < pr.length && icr < cr.length) {
while (cr[icr].x < pr[ipr].x) {
if (++icr == cr.length) {
return unmerged;
}
}
if (cr[icr].x == pr[ipr].x && cr[icr].width == pr[ipr].width) {
unmerged.remove(pr[ipr]);
cr[icr].y = pr[ipr].y;
cr[icr].height = pr[ipr].height + 1;
++icr;
}
else {
++ipr;
}
}
}
return unmerged;
}
}
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
@@ -10,7 +10,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.examples.dnd;
package com.sun.jna.platform.dnd;
import java.awt.AlphaComposite;
import java.awt.Component;
@@ -38,6 +38,7 @@ import java.awt.dnd.DropTargetEvent;
import java.awt.dnd.InvalidDnDOperationException;
import java.awt.event.InputEvent;
import java.awt.image.BufferedImage;
import javax.swing.Icon;
import javax.swing.JColorChooser;
import javax.swing.JFileChooser;
@@ -162,7 +163,7 @@ public abstract class DragHandler
try {
// getTransferable is available during drag only on 1.5+
return (Transferable)
e.getClass().getMethod("getTransferable", null).invoke(e, null);
e.getClass().getMethod("getTransferable", (Class[])null).invoke(e, (Object[])null);
}
catch(Exception ex) {
// Method not available
@@ -179,7 +180,7 @@ public abstract class DragHandler
private Component dragSource;
private GhostedDragImage ghost;
private Point imageOffset;
private Dimension maxGhostSize = MAX_GHOST_SIZE;
private Dimension maxGhostSize = MAX_GHOST_SIZE;
private float ghostAlpha = DEFAULT_GHOST_ALPHA;
/** Enable drags from the given component, supporting the actions in
@@ -529,4 +530,4 @@ public abstract class DragHandler
}
updateCursor(e);
}
}
}
@@ -10,7 +10,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.examples.dnd;
package com.sun.jna.platform.dnd;
import java.awt.Component;
import java.awt.Point;
@@ -88,7 +88,7 @@ import java.util.Set;
public abstract class DropHandler implements DropTargetListener {
private int acceptedActions;
private List acceptedFlavors;
private List<DataFlavor> acceptedFlavors;
private DropTarget dropTarget;
private boolean active = true;
private DropTargetPainter painter;
@@ -347,7 +347,7 @@ public abstract class DropHandler implements DropTargetListener {
* constructor.
*/
protected boolean isSupported(DataFlavor[] flavors) {
Set set = new HashSet(Arrays.asList(flavors));
Set<DataFlavor> set = new HashSet<DataFlavor>(Arrays.asList(flavors));
set.retainAll(acceptedFlavors);
return !set.isEmpty();
}
@@ -10,7 +10,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.examples.dnd;
package com.sun.jna.platform.dnd;
import java.awt.Point;
import java.awt.dnd.DropTargetEvent;
@@ -10,7 +10,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.examples.dnd;
package com.sun.jna.platform.dnd;
import java.awt.Component;
import java.awt.Dimension;
@@ -29,7 +29,7 @@ import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.Timer;
import com.sun.jna.examples.WindowUtils;
import com.sun.jna.platform.WindowUtils;
/** Provide a ghosted drag image for use during drags where
* {@link DragSource#isDragImageSupported} returns false.<p>
@@ -56,6 +56,7 @@ public class GhostedDragImage {
// FIXME ensure gc is compatible (X11)
GraphicsConfiguration gc = parent.getGraphicsConfiguration();
dragImage = new Window(JOptionPane.getRootFrame(), gc) {
private static final long serialVersionUID = 1L;
public void paint(Graphics g) {
icon.paintIcon(this, g, 0, 0);
}
@@ -0,0 +1,14 @@
<html>
<head>
<!--
Copyright (c) 2010 Timothy Wall
-->
</head>
<body bgcolor="white">
<!-- One sentence summary -->
Provides integrated, extended drag and drop functionality,
allowing ghosted drag images to be used on all platforms.
</body>
</html>
@@ -0,0 +1,92 @@
/*
* Copyright (c) 2011 Denis Tulskiy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with this work. If not, see <http://www.gnu.org/licenses/>.
*/
package com.sun.jna.platform.mac;
import java.nio.IntBuffer;
import java.util.Arrays;
import java.util.List;
import com.sun.jna.Library;
import com.sun.jna.Callback;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.ptr.PointerByReference;
/**
* Author: Denis Tulskiy
* Date: 7/25/11
*/
public interface Carbon extends Library {
public static Carbon INSTANCE = (Carbon) Native.loadLibrary("Carbon", Carbon.class);
public static final int cmdKey = 0x0100;
public static final int shiftKey = 0x0200;
public static final int optionKey = 0x0800;
public static final int controlKey = 0x1000;
/**
* Obtains the event target reference for the standard toolbox dispatcher
*/
public Pointer GetEventDispatcherTarget();
/**
* Installs an event handler on a specified event target.
*/
public int InstallEventHandler(Pointer inTarget, EventHandlerProcPtr inHandler, int inNumTypes, EventTypeSpec[] inList, Pointer inUserData, PointerByReference outRef);
/**
* Registers a global hot key.
*/
public int RegisterEventHotKey(int inHotKeyCode, int inHotKeyModifiers, EventHotKeyID.ByValue inHotKeyID, Pointer inTarget, int inOptions, PointerByReference outRef);
/**
* Obtains a parameter from the specified event.
*/
public int GetEventParameter(Pointer inEvent, int inName, int inDesiredType, Pointer outActualType, int inBufferSize, IntBuffer outActualSize, EventHotKeyID outData);
/**
* Removes the specified event handler
*/
public int RemoveEventHandler(Pointer inHandlerRef);
/**
* Unregisters a global hot key.
*/
public int UnregisterEventHotKey(Pointer inHotKey);
public class EventTypeSpec extends Structure {
public int eventClass;
public int eventKind;
protected List getFieldOrder() {
return Arrays.asList(new String[] { "eventClass", "eventKind" }); }
}
public static class EventHotKeyID extends Structure {
public int signature;
public int id;
public static class ByValue extends EventHotKeyID implements Structure.ByValue { }
protected List getFieldOrder() {
return Arrays.asList(new String[] { "signature", "id" }); }
}
public static interface EventHandlerProcPtr extends Callback {
public int callback(Pointer inHandlerCallRef, Pointer inEvent, Pointer inUserData);
}
}
@@ -0,0 +1,86 @@
/* Copyright (c) 2007-2013 Timothy Wall, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform.mac;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.ptr.PointerByReference;
import com.sun.jna.ptr.ByteByReference;
import com.sun.jna.platform.FileUtils;
public class MacFileUtils extends FileUtils {
public boolean hasTrash() { return true; }
public interface FileManager extends Library {
public FileManager INSTANCE = (FileManager)Native.loadLibrary("CoreServices", FileManager.class);
int kFSFileOperationDefaultOptions = 0;
int kFSFileOperationsOverwrite = 0x01;
int kFSFileOperationsSkipSourcePermissionErrors = 0x02;
int kFSFileOperationsDoNotMoveAcrossVolumes = 0x04;
int kFSFileOperationsSkipPreflight = 0x08;
int kFSPathDefaultOptions = 0x0;
int kFSPathMakeRefDoNotFollowLeafSymlink = 0x01;
class FSRef extends Structure {
public byte[] hidden = new byte[80];
protected List getFieldOrder() { return Arrays.asList(new String[] { "hidden" }); }
}
// Deprecated; use trashItemAtURL instead:
// https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/Reference/Reference.html#//apple_ref/occ/instm/NSFileManager/trashItemAtURL:resultingItemURL:error:
int FSRefMakePath(FSRef fsref, byte[] path, int maxPathSize);
int FSPathMakeRef(String source, int options, ByteByReference isDirectory);
int FSPathMakeRefWithOptions(String source, int options, FSRef fsref, ByteByReference isDirectory);
int FSPathMoveObjectToTrashSync(String source, PointerByReference target, int options);
int FSMoveObjectToTrashSync(FSRef source, FSRef target, int options);
}
public void moveToTrash(File[] files) throws IOException {
File home = new File(System.getProperty("user.home"));
File trash = new File(home, ".Trash");
if (!trash.exists()) {
throw new IOException("The Trash was not found in its expected location (" + trash + ")");
}
List<String> failed = new ArrayList<String>();
for (int i=0;i < files.length;i++) {
File src = files[i];
FileManager.FSRef fsref = new FileManager.FSRef();
int status = FileManager.INSTANCE.FSPathMakeRefWithOptions(src.getAbsolutePath(),
FileManager.kFSPathMakeRefDoNotFollowLeafSymlink,
fsref, null);
if (status != 0) {
failed.add(src + " (FSRef: " + status + ")");
continue;
}
status = FileManager.INSTANCE.FSMoveObjectToTrashSync(fsref, null, 0);
if (status != 0) {
failed.add(src + " (" + status + ")");
}
}
if (failed.size() > 0) {
throw new IOException("The following files could not be trashed: " + failed);
}
}
}
@@ -0,0 +1,13 @@
<html>
<head>
<!--
Copyright (c) 2010 Timothy Wall
-->
</head>
<body bgcolor="white">
<!-- One sentence summary -->
Provides common library mappings for the OS X platform.
</body>
</html>
@@ -0,0 +1,13 @@
<html>
<head>
<!--
Copyright (c) 2010 Timothy Wall
-->
</head>
<body bgcolor="white">
<!-- One sentence summary -->
Provides cross-platform utilities based on platform-specific libraries.
</body>
</html>
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
@@ -0,0 +1,13 @@
<html>
<head>
<!--
Copyright (c) 2010 Timothy Wall
-->
</head>
<body bgcolor="white">
<!-- One sentence summary -->
Provides common library mappings for Unix and X11-based platforms.
</body>
</html>
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
@@ -0,0 +1,127 @@
/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform.win32;
import com.sun.jna.IntegerType;
import com.sun.jna.Pointer;
import com.sun.jna.ptr.ByReference;
import com.sun.jna.win32.StdCallLibrary;
/**
* Based on basetsd.h (various types)
* @author dblock[at]dblock[dot]org
*/
@SuppressWarnings("serial")
public interface BaseTSD extends StdCallLibrary {
/**
* Signed long type for pointer precision.
* Use when casting a pointer to a long to perform pointer arithmetic.
*/
public static class LONG_PTR extends IntegerType {
public LONG_PTR() {
this(0);
}
public LONG_PTR(long value) {
super(Pointer.SIZE, value);
}
public Pointer toPointer() {
return Pointer.createConstant(longValue());
}
}
/**
* Signed SIZE_T.
*/
public static class SSIZE_T extends LONG_PTR {
public SSIZE_T() {
this(0);
}
public SSIZE_T(long value) {
super(value);
}
}
/**
* Unsigned LONG_PTR.
*/
public static class ULONG_PTR extends IntegerType {
public ULONG_PTR() {
this(0);
}
public ULONG_PTR(long value) {
super(Pointer.SIZE, value, true);
}
public Pointer toPointer() {
return Pointer.createConstant(longValue());
}
}
/**
* PULONG_PTR
*/
public static class ULONG_PTRByReference extends ByReference {
public ULONG_PTRByReference() {
this(new ULONG_PTR(0));
}
public ULONG_PTRByReference(ULONG_PTR value) {
super(Pointer.SIZE);
setValue(value);
}
public void setValue(ULONG_PTR value) {
if (Pointer.SIZE == 4) {
getPointer().setInt(0, value.intValue());
}
else {
getPointer().setLong(0, value.longValue());
}
}
public ULONG_PTR getValue() {
return new ULONG_PTR(Pointer.SIZE == 4
? getPointer().getInt(0)
: getPointer().getLong(0));
}
}
/**
* Unsigned DWORD_PTR.
*/
public static class DWORD_PTR extends IntegerType {
public DWORD_PTR() {
this(0);
}
public DWORD_PTR(long value) {
super(Pointer.SIZE, value);
}
}
/**
* The maximum number of bytes to which a pointer can point.
* Use for a count that must span the full range of a pointer.
*/
public static class SIZE_T extends ULONG_PTR {
public SIZE_T() {
this(0);
}
public SIZE_T(long value) {
super(value);
}
}
}
@@ -0,0 +1,338 @@
/* Copyright (c) 2012 Tobias Wolf, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform.win32.COM;
import com.sun.jna.WString;
import com.sun.jna.platform.win32.Guid;
import com.sun.jna.platform.win32.Guid.CLSID;
import com.sun.jna.platform.win32.Kernel32;
import com.sun.jna.platform.win32.OaIdl;
import com.sun.jna.platform.win32.OaIdl.DISPID;
import com.sun.jna.platform.win32.OaIdl.DISPIDByReference;
import com.sun.jna.platform.win32.OaIdl.EXCEPINFO;
import com.sun.jna.platform.win32.Ole32;
import com.sun.jna.platform.win32.OleAuto;
import com.sun.jna.platform.win32.OleAuto.DISPPARAMS;
import com.sun.jna.platform.win32.Variant.VARIANT;
import com.sun.jna.platform.win32.Variant.VariantArg;
import com.sun.jna.platform.win32.WTypes;
import com.sun.jna.platform.win32.WinDef.LCID;
import com.sun.jna.platform.win32.WinDef.UINT;
import com.sun.jna.platform.win32.WinNT.HRESULT;
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.ptr.PointerByReference;
// TODO: Auto-generated Javadoc
/**
* Helper class to provide basic COM support.
*
* @author Tobias Wolf, wolf.tobias@gmx.net
*/
public class COMBindingBaseObject extends COMInvoker {
/** The Constant LOCALE_USER_DEFAULT. */
public final static LCID LOCALE_USER_DEFAULT = Kernel32.INSTANCE
.GetUserDefaultLCID();
/** The Constant LOCALE_SYSTEM_DEFAULT. */
public final static LCID LOCALE_SYSTEM_DEFAULT = Kernel32.INSTANCE
.GetSystemDefaultLCID();
/** The i unknown. */
private IUnknown iUnknown;
/** The i dispatch. */
private IDispatch iDispatch;
/** IDispatch interface reference. */
private PointerByReference pDispatch = new PointerByReference();
/** IUnknown interface reference. */
private PointerByReference pUnknown = new PointerByReference();
public COMBindingBaseObject(IDispatch dispatch) {
// transfer the value
this.iDispatch = dispatch;
}
public COMBindingBaseObject(CLSID clsid, boolean useActiveInstance) {
this(clsid, useActiveInstance, WTypes.CLSCTX_SERVER);
}
public COMBindingBaseObject(CLSID clsid, boolean useActiveInstance,
int dwClsContext) {
// Initialize COM for this thread...
HRESULT hr = Ole32.INSTANCE.CoInitialize(null);
if (COMUtils.FAILED(hr)) {
Ole32.INSTANCE.CoUninitialize();
throw new COMException("CoInitialize() failed!");
}
if (useActiveInstance) {
hr = OleAuto.INSTANCE.GetActiveObject(clsid, null, this.pUnknown);
if (COMUtils.SUCCEEDED(hr)) {
this.iUnknown = new Unknown(this.pUnknown.getValue());
hr = iUnknown.QueryInterface(IDispatch.IID_IDISPATCH,
this.pDispatch);
} else {
hr = Ole32.INSTANCE.CoCreateInstance(clsid, null, dwClsContext,
IDispatch.IID_IDISPATCH, this.pDispatch);
}
} else {
hr = Ole32.INSTANCE.CoCreateInstance(clsid, null, dwClsContext,
IDispatch.IID_IDISPATCH, this.pDispatch);
}
if (COMUtils.FAILED(hr)) {
throw new COMException("COM object with CLSID "
+ clsid.toGuidString() + " not registered properly!");
}
this.iDispatch = new Dispatch(this.pDispatch.getValue());
}
public COMBindingBaseObject(String progId, boolean useActiveInstance,
int dwClsContext) throws COMException {
// Initialize COM for this thread...
HRESULT hr = Ole32.INSTANCE.CoInitialize(null);
if (COMUtils.FAILED(hr)) {
this.release();
throw new COMException("CoInitialize() failed!");
}
// Get CLSID for Word.Application...
CLSID.ByReference clsid = new CLSID.ByReference();
hr = Ole32.INSTANCE.CLSIDFromProgID(progId, clsid);
if (COMUtils.FAILED(hr)) {
Ole32.INSTANCE.CoUninitialize();
throw new COMException("CLSIDFromProgID() failed!");
}
if (useActiveInstance) {
hr = OleAuto.INSTANCE.GetActiveObject(clsid, null, this.pUnknown);
if (COMUtils.SUCCEEDED(hr)) {
this.iUnknown = new Unknown(this.pUnknown.getValue());
hr = iUnknown.QueryInterface(IDispatch.IID_IDISPATCH,
this.pDispatch);
} else {
hr = Ole32.INSTANCE.CoCreateInstance(clsid, null, dwClsContext,
IDispatch.IID_IDISPATCH, this.pDispatch);
}
} else {
hr = Ole32.INSTANCE.CoCreateInstance(clsid, null, dwClsContext,
IDispatch.IID_IDISPATCH, this.pDispatch);
}
if (COMUtils.FAILED(hr)) {
throw new COMException("COM object with ProgID '" + progId
+ "' and CLSID " + clsid.toGuidString()
+ " not registered properly!");
}
this.iDispatch = new Dispatch(this.pDispatch.getValue());
}
public COMBindingBaseObject(String progId, boolean useActiveInstance)
throws COMException {
this(progId, useActiveInstance, WTypes.CLSCTX_SERVER);
}
/**
* Gets the i dispatch.
*
* @return the i dispatch
*/
public IDispatch getIDispatch() {
return iDispatch;
}
/**
* Gets the i dispatch pointer.
*
* @return the i dispatch pointer
*/
public PointerByReference getIDispatchPointer() {
return pDispatch;
}
/**
* Gets the i unknown.
*
* @return the i unknown
*/
public IUnknown getIUnknown() {
return iUnknown;
}
/**
* Gets the i unknown pointer.
*
* @return the i unknown pointer
*/
public PointerByReference getIUnknownPointer() {
return pUnknown;
}
/**
* Release.
*/
public void release() {
if (this.iDispatch != null)
this.iDispatch.Release();
Ole32.INSTANCE.CoUninitialize();
}
protected HRESULT oleMethod(int nType, VARIANT.ByReference pvResult,
IDispatch pDisp, String name, VARIANT[] pArgs) throws COMException {
if (pDisp == null)
throw new COMException("pDisp (IDispatch) parameter is null!");
// variable declaration
WString[] ptName = new WString[] { new WString(name) };
DISPIDByReference pdispID = new DISPIDByReference();
// Get DISPID for name passed...
HRESULT hr = pDisp.GetIDsOfNames(Guid.IID_NULL, ptName, 1,
LOCALE_USER_DEFAULT, pdispID);
COMUtils.checkRC(hr);
return this
.oleMethod(nType, pvResult, pDisp, pdispID.getValue(), pArgs);
}
protected HRESULT oleMethod(int nType, VARIANT.ByReference pvResult,
IDispatch pDisp, DISPID dispId, VARIANT[] pArgs)
throws COMException {
if (pDisp == null)
throw new COMException("pDisp (IDispatch) parameter is null!");
// variable declaration
int _argsLen = 0;
VARIANT[] _args = null;
DISPPARAMS dp = new DISPPARAMS();
EXCEPINFO.ByReference pExcepInfo = new EXCEPINFO.ByReference();
IntByReference puArgErr = new IntByReference();
// make parameter reverse ordering as expected by COM runtime
if ((pArgs != null) && (pArgs.length > 0)) {
_argsLen = pArgs.length;
_args = new VARIANT[_argsLen];
int revCount = _argsLen;
for (int i = 0; i < _argsLen; i++) {
_args[i] = pArgs[--revCount];
}
}
// Handle special-case for property-puts!
if (nType == OleAuto.DISPATCH_PROPERTYPUT) {
dp.cNamedArgs = new UINT(_argsLen);
dp.rgdispidNamedArgs = new DISPIDByReference(
OaIdl.DISPID_PROPERTYPUT);
}
// Build DISPPARAMS
if (_argsLen > 0) {
dp.cArgs = new UINT(_args.length);
// make pointer of variant array
dp.rgvarg = new VariantArg.ByReference(_args);
// write 'DISPPARAMS' structure to memory
dp.write();
}
// Make the call!
HRESULT hr = pDisp.Invoke(dispId, Guid.IID_NULL, LOCALE_SYSTEM_DEFAULT,
new DISPID(nType), dp, pvResult, pExcepInfo, puArgErr);
COMUtils.checkRC(hr, pExcepInfo, puArgErr);
return hr;
}
/**
* Ole method.
*
* @param nType
* the n type
* @param pvResult
* the pv result
* @param pDisp
* the disp
* @param name
* the name
* @param pArg
* the arg
* @return the hresult
* @throws COMException
* the cOM exception
*/
protected HRESULT oleMethod(int nType, VARIANT.ByReference pvResult,
IDispatch pDisp, String name, VARIANT pArg) throws COMException {
return this.oleMethod(nType, pvResult, pDisp, name,
new VARIANT[] { pArg });
}
protected HRESULT oleMethod(int nType, VARIANT.ByReference pvResult,
IDispatch pDisp, DISPID dispId, VARIANT pArg) throws COMException {
return this.oleMethod(nType, pvResult, pDisp, dispId,
new VARIANT[] { pArg });
}
/**
* Ole method.
*
* @param nType
* the n type
* @param pvResult
* the pv result
* @param pDisp
* the disp
* @param name
* the name
* @return the hresult
* @throws COMException
* the cOM exception
*/
protected HRESULT oleMethod(int nType, VARIANT.ByReference pvResult,
IDispatch pDisp, String name) throws COMException {
return this.oleMethod(nType, pvResult, pDisp, name, (VARIANT[]) null);
}
protected HRESULT oleMethod(int nType, VARIANT.ByReference pvResult,
IDispatch pDisp, DISPID dispId) throws COMException {
return this.oleMethod(nType, pvResult, pDisp, dispId, (VARIANT[]) null);
}
/**
* Check failed.
*
* @param hr
* the hr
*/
protected void checkFailed(HRESULT hr) {
COMUtils.checkRC(hr, null, null);
}
}
@@ -0,0 +1,100 @@
/* Copyright (c) 2012 Tobias Wolf, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform.win32.COM;
import com.sun.jna.WString;
import com.sun.jna.platform.win32.Guid.CLSID;
import com.sun.jna.platform.win32.Guid.IID;
import com.sun.jna.platform.win32.OaIdl.DISPID;
import com.sun.jna.platform.win32.OaIdl.DISPIDByReference;
import com.sun.jna.platform.win32.OaIdl.EXCEPINFO;
import com.sun.jna.platform.win32.OleAuto;
import com.sun.jna.platform.win32.OleAuto.DISPPARAMS;
import com.sun.jna.platform.win32.Variant.VARIANT;
import com.sun.jna.platform.win32.Variant.VARIANT.ByReference;
import com.sun.jna.platform.win32.WinDef.LCID;
import com.sun.jna.platform.win32.WinDef.UINT;
import com.sun.jna.platform.win32.WinDef.UINTByReference;
import com.sun.jna.platform.win32.WinNT.HRESULT;
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.ptr.PointerByReference;
// TODO: Auto-generated Javadoc
/**
* Helper class to provide basic COM support.
*
* @author Tobias Wolf, wolf.tobias@gmx.net
*/
public class COMEarlyBindingObject extends COMBindingBaseObject implements
IDispatch {
public COMEarlyBindingObject(CLSID clsid, boolean useActiveInstance,
int dwClsContext) {
super(clsid, useActiveInstance, dwClsContext);
}
protected String getStringProperty(DISPID dispId) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_PROPERTYGET, result,
this.getIDispatch(), dispId);
return result.getValue().toString();
}
protected void setProperty(DISPID dispId, boolean value) {
this.oleMethod(OleAuto.DISPATCH_PROPERTYPUT, null, this.getIDispatch(),
dispId, new VARIANT(value));
}
@Override
public HRESULT QueryInterface(IID riid, PointerByReference ppvObject) {
return this.getIDispatch().QueryInterface(riid, ppvObject);
}
@Override
public int AddRef() {
return this.getIDispatch().AddRef();
}
@Override
public int Release() {
return this.getIDispatch().Release();
}
@Override
public HRESULT GetTypeInfoCount(UINTByReference pctinfo) {
return this.getIDispatch().GetTypeInfoCount(pctinfo);
}
@Override
public HRESULT GetTypeInfo(UINT iTInfo, LCID lcid,
PointerByReference ppTInfo) {
return this.getIDispatch().GetTypeInfo(iTInfo, lcid, ppTInfo);
}
@Override
public HRESULT GetIDsOfNames(IID riid, WString[] rgszNames, int cNames,
LCID lcid, DISPIDByReference rgDispId) {
return this.getIDispatch().GetIDsOfNames(riid, rgszNames, cNames, lcid,
rgDispId);
}
@Override
public HRESULT Invoke(DISPID dispIdMember, IID riid, LCID lcid,
DISPID wFlags, DISPPARAMS pDispParams, ByReference pVarResult,
EXCEPINFO.ByReference pExcepInfo,
IntByReference puArgErr) {
return this.getIDispatch().Invoke(dispIdMember, riid, lcid, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr);
}
}
@@ -0,0 +1,115 @@
/* Copyright (c) 2012 Tobias Wolf, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform.win32.COM;
import com.sun.jna.platform.win32.OaIdl.EXCEPINFO;
import com.sun.jna.ptr.IntByReference;
// TODO: Auto-generated Javadoc
/**
* Exception class for all COM related classes.
*
* @author Tobias Wolf, wolf.tobias@gmx.net
*/
public class COMException extends RuntimeException {
/** The p excep info. */
private EXCEPINFO pExcepInfo;
/** The pu arg err. */
private IntByReference puArgErr;
private int uArgErr;
/**
* Instantiates a new automation exception.
*/
public COMException() {
super();
}
/**
* Instantiates a new automation exception.
*
* @param message
* the message
* @param cause
* the cause
*/
public COMException(String message, Throwable cause) {
super(message, cause);
}
/**
* Instantiates a new automation exception.
*
* @param message
* the message
*/
public COMException(String message) {
super(message);
}
/**
* Instantiates a new automation exception.
*
* @param message
* the message
* @param pExcepInfo
* the excep info
* @param puArgErr
* the pu arg err
*/
public COMException(String message, EXCEPINFO pExcepInfo,
IntByReference puArgErr) {
super(message + " (puArgErr=" + puArgErr.getValue() + ")");
this.pExcepInfo = pExcepInfo;
this.puArgErr = puArgErr;
}
/**
* Instantiates a new automation exception.
*
* @param cause
* the cause
*/
public COMException(Throwable cause) {
super(cause);
}
/**
* Gets the excep info.
*
* @return the excep info
*/
public EXCEPINFO getExcepInfo() {
return pExcepInfo;
}
/**
* Gets the arg err.
*
* @return the arg err
*/
public IntByReference getArgErr() {
return puArgErr;
}
public int getuArgErr() {
return uArgErr;
}
public void setuArgErr(int uArgErr) {
this.uArgErr = uArgErr;
}
}
@@ -0,0 +1,49 @@
/* Copyright (c) 2013 Tobias Wolf, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform.win32.COM;
import com.sun.jna.Function;
import com.sun.jna.Pointer;
import com.sun.jna.PointerType;
public abstract class COMInvoker extends PointerType {
protected int _invokeNativeInt(int vtableId, Object[] args) {
Pointer vptr = this.getPointer().getPointer(0);
// we take the vtable id and multiply with the pointer size (4 bytes on
// 32bit OS)
Function func = Function.getFunction(vptr.getPointer(vtableId
* Pointer.SIZE));
return func.invokeInt(args);
}
protected Object _invokeNativeObject(int vtableId, Object[] args,
Class returnType) {
Pointer vptr = this.getPointer().getPointer(0);
// we take the vtable id and multiply with the pointer size (4 bytes on
// 32bit OS)
Function func = Function.getFunction(vptr.getPointer(vtableId
* Pointer.SIZE));
return func.invoke(returnType, args);
}
protected void _invokeNativeVoid(int vtableId, Object[] args) {
Pointer vptr = this.getPointer().getPointer(0);
// we take the vtable id and multiply with the pointer size (4 bytes on
// 32bit OS)
Function func = Function.getFunction(vptr.getPointer(vtableId
* Pointer.SIZE));
func.invokeVoid(args);
}
}
@@ -0,0 +1,622 @@
/* Copyright (c) 2012 Tobias Wolf, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform.win32.COM;
import java.util.Date;
import com.sun.jna.platform.win32.Guid.CLSID;
import com.sun.jna.platform.win32.OaIdl.VARIANT_BOOL;
import com.sun.jna.platform.win32.OleAuto;
import com.sun.jna.platform.win32.Variant.VARIANT;
import com.sun.jna.platform.win32.WinDef.LONG;
import com.sun.jna.platform.win32.WinDef.SHORT;
// TODO: Auto-generated Javadoc
/**
* Helper class to provide basic COM support.
*
* @author Tobias Wolf, wolf.tobias@gmx.net
*/
public class COMLateBindingObject extends COMBindingBaseObject {
/**
* Instantiates a new cOM object.
*
* @param iDispatch
* the i dispatch
*/
public COMLateBindingObject(IDispatch iDispatch) {
super(iDispatch);
}
/**
* Instantiates a new cOM object.
*
* @param clsid
* the clsid
* @param useActiveInstance
* the use active instance
*/
public COMLateBindingObject(CLSID clsid, boolean useActiveInstance) {
super(clsid, useActiveInstance);
}
/**
* Instantiates a new cOM object.
*
* @param progId
* the prog id
* @param useActiveInstance
* the use active instance
* @throws COMException
* the automation exception
*/
public COMLateBindingObject(String progId, boolean useActiveInstance)
throws COMException {
super(progId, useActiveInstance);
}
/**
* Gets the automation property.
*
* @param propertyName
* the property name
* @return the automation property
*/
protected IDispatch getAutomationProperty(String propertyName) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_PROPERTYGET, result,
this.getIDispatch(), propertyName);
return ((IDispatch) result.getValue());
}
/**
* Gets the automation property.
*
* @param propertyName
* the property name
* @param comObject
* the com object
* @return the automation property
*/
protected IDispatch getAutomationProperty(String propertyName,
COMLateBindingObject comObject) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_PROPERTYGET, result,
comObject.getIDispatch(), propertyName);
return ((IDispatch) result.getValue());
}
/**
* Gets the automation property.
*
* @param propertyName
* the property name
* @param comObject
* the com object
* @param value
* the value
* @return the automation property
*/
protected IDispatch getAutomationProperty(String propertyName,
COMLateBindingObject comObject, VARIANT value) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_PROPERTYGET, result,
comObject.getIDispatch(), propertyName, value);
return ((IDispatch) result.getValue());
}
/**
* Gets the automation property.
*
* @param propertyName
* the property name
* @param iDispatch
* the i dispatch
* @return the automation property
*/
protected IDispatch getAutomationProperty(String propertyName,
IDispatch iDispatch) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_PROPERTYGET, result,
this.getIDispatch(), propertyName);
return ((IDispatch) result.getValue());
}
/**
* Gets the boolean property.
*
* @param propertyName
* the property name
* @return the boolean property
*/
protected boolean getBooleanProperty(String propertyName) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_PROPERTYGET, result,
this.getIDispatch(), propertyName);
return (((VARIANT_BOOL) result.getValue()).intValue() != 0);
}
/**
* Gets the date property.
*
* @param propertyName
* the property name
* @return the date property
*/
protected Date getDateProperty(String propertyName) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_PROPERTYGET, result,
this.getIDispatch(), propertyName);
return result.dateValue();
}
/**
* Gets the int property.
*
* @param propertyName
* the property name
* @return the int property
*/
protected int getIntProperty(String propertyName) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_PROPERTYGET, result,
this.getIDispatch(), propertyName);
return ((LONG) result.getValue()).intValue();
}
/**
* Gets the short property.
*
* @param propertyName
* the property name
* @return the short property
*/
protected short getShortProperty(String propertyName) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_PROPERTYGET, result,
this.getIDispatch(), propertyName);
return ((SHORT) result.getValue()).shortValue();
}
/**
* Gets the string property.
*
* @param propertyName
* the property name
* @return the string property
*/
protected String getStringProperty(String propertyName) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_PROPERTYGET, result,
this.getIDispatch(), propertyName);
return result.getValue().toString();
}
/**
* Invoke.
*
* @param methodName
* the method name
* @return the variant
*/
protected VARIANT invoke(String methodName) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_METHOD, result, this.getIDispatch(),
methodName);
return result;
}
/**
* Invoke.
*
* @param methodName
* the method name
* @param arg
* the arg
* @return the variant
*/
protected VARIANT invoke(String methodName, VARIANT arg) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_METHOD, result, this.getIDispatch(),
methodName, arg);
return result;
}
/**
* Invoke.
*
* @param methodName
* the method name
* @param args
* the args
* @return the variant
*/
protected VARIANT invoke(String methodName, VARIANT[] args) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_METHOD, result, this.getIDispatch(),
methodName, args);
return result;
}
/**
* Invoke.
*
* @param methodName
* the method name
* @param arg1
* the arg1
* @param arg2
* the arg2
* @return the variant
*/
protected VARIANT invoke(String methodName, VARIANT arg1, VARIANT arg2) {
return invoke(methodName, new VARIANT[] { arg1, arg2 });
}
/**
* Invoke.
*
* @param methodName
* the method name
* @param arg1
* the arg1
* @param arg2
* the arg2
* @param arg3
* the arg3
* @return the variant
*/
protected VARIANT invoke(String methodName, VARIANT arg1, VARIANT arg2,
VARIANT arg3) {
return invoke(methodName, new VARIANT[] { arg1, arg2, arg3 });
}
/**
* Invoke.
*
* @param methodName
* the method name
* @param arg1
* the arg1
* @param arg2
* the arg2
* @param arg3
* the arg3
* @param arg4
* the arg4
* @return the variant
*/
protected VARIANT invoke(String methodName, VARIANT arg1, VARIANT arg2,
VARIANT arg3, VARIANT arg4) {
return invoke(methodName, new VARIANT[] { arg1, arg2, arg3, arg4 });
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
* @param dispatch
* the dispatch
*/
protected void invokeNoReply(String methodName, IDispatch dispatch) {
this.oleMethod(OleAuto.DISPATCH_METHOD, null, dispatch, methodName);
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
* @param comObject
* the com object
*/
protected void invokeNoReply(String methodName,
COMLateBindingObject comObject) {
this.oleMethod(OleAuto.DISPATCH_METHOD, null, comObject.getIDispatch(),
methodName);
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
* @param dispatch
* the dispatch
* @param arg
* the arg
*/
protected void invokeNoReply(String methodName, IDispatch dispatch,
VARIANT arg) {
this.oleMethod(OleAuto.DISPATCH_METHOD, null, dispatch, methodName, arg);
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
* @param dispatch
* the dispatch
* @param arg1
* the arg1
* @param arg2
* the arg2
*/
protected void invokeNoReply(String methodName, IDispatch dispatch,
VARIANT arg1, VARIANT arg2) {
this.oleMethod(OleAuto.DISPATCH_METHOD, null, dispatch, methodName,
new VARIANT[] { arg1, arg2 });
}
protected void invokeNoReply(String methodName, COMLateBindingObject comObject,
VARIANT arg1, VARIANT arg2) {
this.oleMethod(OleAuto.DISPATCH_METHOD, null, comObject.getIDispatch(), methodName,
new VARIANT[] { arg1, arg2 });
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
* @param comObject
* the com object
* @param arg
* the arg
*/
protected void invokeNoReply(String methodName,
COMLateBindingObject comObject, VARIANT arg) {
this.oleMethod(OleAuto.DISPATCH_METHOD, null, comObject.getIDispatch(),
methodName, arg);
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
* @param dispatch
* the dispatch
* @param args
* the args
*/
protected void invokeNoReply(String methodName, IDispatch dispatch,
VARIANT[] args) {
this.oleMethod(OleAuto.DISPATCH_METHOD, null, dispatch, methodName,
args);
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
*/
protected void invokeNoReply(String methodName) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_METHOD, result, this.getIDispatch(),
methodName);
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
* @param arg
* the arg
*/
protected void invokeNoReply(String methodName, VARIANT arg) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_METHOD, result, this.getIDispatch(),
methodName, arg);
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
* @param args
* the args
*/
protected void invokeNoReply(String methodName, VARIANT[] args) {
VARIANT.ByReference result = new VARIANT.ByReference();
this.oleMethod(OleAuto.DISPATCH_METHOD, result, this.getIDispatch(),
methodName, args);
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
* @param arg1
* the arg1
* @param arg2
* the arg2
*/
protected void invokeNoReply(String methodName, VARIANT arg1, VARIANT arg2) {
invokeNoReply(methodName, new VARIANT[] { arg1, arg2 });
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
* @param arg1
* the arg1
* @param arg2
* the arg2
* @param arg3
* the arg3
*/
protected void invokeNoReply(String methodName, VARIANT arg1, VARIANT arg2,
VARIANT arg3) {
invokeNoReply(methodName, new VARIANT[] { arg1, arg2, arg3 });
}
/**
* Invoke no reply.
*
* @param methodName
* the method name
* @param arg1
* the arg1
* @param arg2
* the arg2
* @param arg3
* the arg3
* @param arg4
* the arg4
*/
protected void invokeNoReply(String methodName, VARIANT arg1, VARIANT arg2,
VARIANT arg3, VARIANT arg4) {
invokeNoReply(methodName, new VARIANT[] { arg1, arg2, arg3, arg4 });
}
/**
* Sets the property.
*
* @param propertyName
* the property name
* @param value
* the value
*/
protected void setProperty(String propertyName, boolean value) {
this.oleMethod(OleAuto.DISPATCH_PROPERTYPUT, null, this.getIDispatch(),
propertyName, new VARIANT(value));
}
/**
* Sets the property.
*
* @param propertyName
* the property name
* @param value
* the value
*/
protected void setProperty(String propertyName, Date value) {
this.oleMethod(OleAuto.DISPATCH_PROPERTYPUT, null, this.getIDispatch(),
propertyName, new VARIANT(value));
}
/**
* Sets the property.
*
* @param propertyName
* the property name
* @param value
* the value
*/
protected void setProperty(String propertyName, IDispatch value) {
this.oleMethod(OleAuto.DISPATCH_PROPERTYPUT, null, this.getIDispatch(),
propertyName, new VARIANT(value));
}
/**
* Sets the property.
*
* @param propertyName
* the property name
* @param value
* the value
*/
protected void setProperty(String propertyName, int value) {
this.oleMethod(OleAuto.DISPATCH_PROPERTYPUT, null, this.getIDispatch(),
propertyName, new VARIANT(value));
}
/**
* Sets the property.
*
* @param propertyName
* the property name
* @param value
* the value
*/
protected void setProperty(String propertyName, short value) {
this.oleMethod(OleAuto.DISPATCH_PROPERTYPUT, null, this.getIDispatch(),
propertyName, new VARIANT(value));
}
/**
* Sets the property.
*
* @param propertyName
* the property name
* @param value
* the value
*/
protected void setProperty(String propertyName, String value) {
this.oleMethod(OleAuto.DISPATCH_PROPERTYPUT, null, this.getIDispatch(),
propertyName, new VARIANT(value));
}
/**
* Sets the property.
*
* @param propertyName
* the property name
* @param iDispatch
* the i dispatch
* @param value
* the value
*/
protected void setProperty(String propertyName, IDispatch iDispatch,
VARIANT value) {
this.oleMethod(OleAuto.DISPATCH_PROPERTYPUT, null, iDispatch,
propertyName, value);
}
/**
* Sets the property.
*
* @param propertyName
* the property name
* @param comObject
* the com object
* @param value
* the value
*/
protected void setProperty(String propertyName,
COMLateBindingObject comObject, VARIANT value) {
this.oleMethod(OleAuto.DISPATCH_PROPERTYPUT, null,
comObject.getIDispatch(), propertyName, value);
}
/**
* To variant.
*
* @return the variant
*/
public VARIANT toVariant() {
return new VARIANT(this.getIDispatch());
}
}
@@ -0,0 +1,231 @@
/* Copyright (c) 2013 Tobias Wolf, All Rights Reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.sun.jna.platform.win32.COM;
import java.util.ArrayList;
import com.sun.jna.Native;
import com.sun.jna.platform.win32.Advapi32;
import com.sun.jna.platform.win32.Advapi32Util;
import com.sun.jna.platform.win32.Advapi32Util.EnumKey;
import com.sun.jna.platform.win32.Advapi32Util.InfoKey;
import com.sun.jna.platform.win32.Kernel32Util;
import com.sun.jna.platform.win32.OaIdl.EXCEPINFO;
import com.sun.jna.platform.win32.WTypes.BSTR;
import com.sun.jna.platform.win32.WinNT;
import com.sun.jna.platform.win32.WinNT.HRESULT;
import com.sun.jna.platform.win32.WinReg;
import com.sun.jna.platform.win32.WinReg.HKEYByReference;
import com.sun.jna.ptr.IntByReference;
// TODO: Auto-generated Javadoc
/**
* The Class COMUtils.
*
* @author wolf.tobias@gmx.net The Class COMUtils.
*/
public abstract class COMUtils {
/** The Constant CO_E_NOTINITIALIZED. */
public static final int S_OK = 0;
/**
* Succeeded.
*
* @param hr
* the hr
* @return true, if successful
*/
public static boolean SUCCEEDED(HRESULT hr) {
return SUCCEEDED(hr.intValue());
}
/**
* Succeeded.
*
* @param hr
* the hr
* @return true, if successful
*/
public static boolean SUCCEEDED(int hr) {
if (hr == S_OK)
return true;
else
return false;
}
/**
* Failed.
*
* @param hr
* the hr
* @return true, if successful
*/
public static boolean FAILED(HRESULT hr) {
return FAILED(hr.intValue());
}
/**
* Failed.
*
* @param hr
* the hr
* @return true, if successful
*/
public static boolean FAILED(int hr) {
if (hr != S_OK)
return true;
else
return false;
}
/**
* Throw new exception.
*
* @param hr
* the hr
*/
public static void checkRC(HRESULT hr) {
checkRC(hr, null, null);
}
/**
* Throw new exception.
*
* @param hr
* the hr
* @param pExcepInfo
* the excep info
* @param puArgErr
* the pu arg err
*/
public static void checkRC(HRESULT hr, EXCEPINFO pExcepInfo,
IntByReference puArgErr) {
if (FAILED(hr)) {
String formatMessageFromHR = Kernel32Util.formatMessage(hr);
throw new COMException(formatMessageFromHR, pExcepInfo, puArgErr);
}
}
/**
* Gets the all com info on system.
*
* @return the all com info on system
*/
public static ArrayList<COMInfo> getAllCOMInfoOnSystem() {
HKEYByReference phkResult = new HKEYByReference();
HKEYByReference phkResult2 = new HKEYByReference();
String subKey;
ArrayList<COMInfo> comInfos = new ArrayList<COMUtils.COMInfo>();
try {
// open root key
phkResult = Advapi32Util.registryGetKey(WinReg.HKEY_CLASSES_ROOT,
"CLSID", WinNT.KEY_ALL_ACCESS);
// open subkey
InfoKey infoKey = Advapi32Util.registryQueryInfoKey(
phkResult.getValue(), WinNT.KEY_ALL_ACCESS);
for (int i = 0; i < infoKey.lpcSubKeys.getValue(); i++) {
EnumKey enumKey = Advapi32Util.registryRegEnumKey(
phkResult.getValue(), i);
subKey = Native.toString(enumKey.lpName);
COMInfo comInfo = new COMInfo(subKey);
phkResult2 = Advapi32Util.registryGetKey(phkResult.getValue(),
subKey, WinNT.KEY_ALL_ACCESS);
InfoKey infoKey2 = Advapi32Util.registryQueryInfoKey(
phkResult2.getValue(), WinNT.KEY_ALL_ACCESS);
for (int y = 0; y < infoKey2.lpcSubKeys.getValue(); y++) {
EnumKey enumKey2 = Advapi32Util.registryRegEnumKey(
phkResult2.getValue(), y);
String subKey2 = Native.toString(enumKey2.lpName);
if (subKey2.equals("InprocHandler32")) {
comInfo.inprocHandler32 = (String) Advapi32Util
.registryGetValue(phkResult2.getValue(),
subKey2, null);
} else if (subKey2.equals("InprocServer32")) {
comInfo.inprocServer32 = (String) Advapi32Util
.registryGetValue(phkResult2.getValue(),
subKey2, null);
} else if (subKey2.equals("LocalServer32")) {
comInfo.localServer32 = (String) Advapi32Util
.registryGetValue(phkResult2.getValue(),
subKey2, null);
} else if (subKey2.equals("ProgID")) {
comInfo.progID = (String) Advapi32Util
.registryGetValue(phkResult2.getValue(),
subKey2, null);
} else if (subKey2.equals("TypeLib")) {
comInfo.typeLib = (String) Advapi32Util
.registryGetValue(phkResult2.getValue(),
subKey2, null);
}
}
Advapi32.INSTANCE.RegCloseKey(phkResult2.getValue());
comInfos.add(comInfo);
}
} finally {
Advapi32.INSTANCE.RegCloseKey(phkResult.getValue());
Advapi32.INSTANCE.RegCloseKey(phkResult2.getValue());
}
return comInfos;
}
/**
* The Class COMInfo.
*
* @author wolf.tobias@gmx.net The Class COMInfo.
*/
public static class COMInfo {
/** The clsid. */
public String clsid;
/** The inproc handler32. */
public String inprocHandler32;
/** The inproc server32. */
public String inprocServer32;
/** The local server32. */
public String localServer32;
/** The prog id. */
public String progID;
/** The type lib. */
public String typeLib;
/**
* Instantiates a new cOM info.
*/
public COMInfo() {
}
/**
* Instantiates a new cOM info.
*
* @param clsid
* the clsid
*/
public COMInfo(String clsid) {
this.clsid = clsid;
}
}
}

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais