win 0.3.1 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY ADDED
@@ -0,0 +1,8 @@
1
+ == 0.0.0 / 2010-01-17
2
+
3
+
4
+ == 0.3.2 / 2010-04-17
5
+
6
+ == 0.3.3 / 2010-04-17
7
+
8
+ * Moved from Jeweler to own Rake tasks
data/README.rdoc CHANGED
@@ -20,7 +20,7 @@ You just want to put these function calls into your Ruby code without too much p
20
20
  You'd love this to be more or less natural extension of your Ruby code, preferably
21
21
  not turning your code base into an ugly spaghetty of CamelCase calls, String/Array
22
22
  pack/unpack gymnastics, buffer/pointer allocations, extracting return values
23
- from [in/out] parameters and checking return codes for 0.
23
+ from <in/out> parameters and checking return codes for 0.
24
24
 
25
25
  You have several options at this point. You can use 'win32-api' or 'ffi' libraries
26
26
  to connect your ruby code to Windows API and manually define wrapper methods for
@@ -119,7 +119,7 @@ Contributors always welcome!
119
119
  require 'win/gui/window'
120
120
 
121
121
  class MyClass
122
- include Win::GUI::Window
122
+ include Win::Gui::Window
123
123
 
124
124
  fg_window = foreground_window
125
125
  puts window_text(fg_window)
data/Rakefile CHANGED
@@ -1,58 +1,24 @@
1
- require 'rubygems'
2
- require 'rake'
1
+ require 'pathname'
2
+ NAME = 'win'
3
+ BASE_PATH = Pathname.new(__FILE__).dirname
4
+ LIB_PATH = BASE_PATH + 'lib'
5
+ PKG_PATH = BASE_PATH + 'pkg'
6
+ DOC_PATH = BASE_PATH + 'rdoc'
3
7
 
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "win"
8
- gem.summary = %Q{Rubyesque interfaces and wrappers for Windows API functions pre-defined using FFI }
9
- gem.description = %Q{Rubyesque interfaces and wrappers for Windows API functions pre-defined using FFI }
10
- gem.email = "arvitallian@gmail.com"
11
- gem.homepage = "http://github.com/arvicco/win"
12
- gem.authors = ["arvicco"]
13
- gem.add_dependency "ffi", ">= 0.6.0"
14
- gem.add_development_dependency "rspec", ">= 1.2.9"
15
- gem.add_development_dependency "cucumber", ">= 0"
16
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
- end
18
- Jeweler::GemcutterTasks.new
19
- rescue LoadError
20
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
21
- end
22
-
23
- require 'spec/rake/spectask'
24
- Spec::Rake::SpecTask.new(:spec) do |spec|
25
- spec.libs << 'lib' << 'spec'
26
- spec.spec_files = FileList['spec/**/*_spec.rb']
27
- end
8
+ $LOAD_PATH.unshift LIB_PATH.to_s
9
+ require 'version'
28
10
 
29
- Spec::Rake::SpecTask.new(:rcov) do |spec|
30
- spec.libs << 'lib' << 'spec'
31
- spec.pattern = 'spec/**/*_spec.rb'
32
- spec.rcov = true
33
- end
34
-
35
- task :spec => :check_dependencies
11
+ CLASS_NAME = Win
12
+ VERSION = CLASS_NAME::VERSION
36
13
 
37
14
  begin
38
- require 'cucumber/rake/task'
39
- Cucumber::Rake::Task.new(:features)
40
-
41
- task :features => :check_dependencies
15
+ require 'rake'
42
16
  rescue LoadError
43
- task :features do
44
- abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
45
- end
17
+ require 'rubygems'
18
+ gem 'rake', '~> 0.8.3.1'
19
+ require 'rake'
46
20
  end
47
21
 
48
- task :default => :spec
22
+ # Load rakefile tasks
23
+ Dir['tasks/*.rake'].sort.each { |file| load file }
49
24
 
50
- require 'rake/rdoctask'
51
- Rake::RDocTask.new do |rdoc|
52
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
53
-
54
- rdoc.rdoc_dir = 'rdoc'
55
- rdoc.title = "win #{version}"
56
- rdoc.rdoc_files.include('README*')
57
- rdoc.rdoc_files.include('lib/**/*.rb')
58
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.3
data/lib/version.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'pathname'
2
+
3
+ module Win
4
+
5
+ VERSION_FILE = Pathname.new(__FILE__).dirname + '../VERSION' # :nodoc:
6
+ VERSION = VERSION_FILE.exist? ? VERSION_FILE.read.strip : nil
7
+
8
+ end
data/lib/win/dde.rb CHANGED
@@ -591,7 +591,7 @@ module Win
591
591
  #
592
592
  # [*Syntax*] UINT RegisterClipboardFormat( LPCTSTR lpszFormat )
593
593
  #
594
- # lpszFormat:: [in] Pointer to a null-terminated string that names the new format.
594
+ # lpszFormat:: <in> Pointer to a null-terminated string that names the new format.
595
595
  #
596
596
  # *Returns*:: :uint or nil. If the function succeeds, the return value identifies the registered clipboard format.
597
597
  # If the function fails, the return value is *nil*(not zero). For error info, call GetLastError.
@@ -617,7 +617,7 @@ module Win
617
617
  #
618
618
  # [*Syntax*] HDDEDATA CALLBACK DdeCallback( UINT uType, UINT uFmt, HCONV hconv, HDDEDATA hsz1, HDDEDATA hsz2,
619
619
  # HDDEDATA hdata, HDDEDATA dwData1, HDDEDATA dwData2);
620
- # uType:: [in] Specifies the type of the current transaction. This parameter consists of a combination of
620
+ # uType:: <in> Specifies the type of the current transaction. This parameter consists of a combination of
621
621
  # transaction class flags and transaction type flags. The following table describes each of the
622
622
  # transaction classes and provides a list of the transaction types in each class. For information
623
623
  # about a specific transaction type, see the individual description of that type.
@@ -671,16 +671,16 @@ module Win
671
671
  # - XTYP_REGISTER
672
672
  # - XTYP_XACT_COMPLETE
673
673
  # - XTYP_UNREGISTER
674
- # uFmt:: [in] Specifies the format in which data is sent or received.
675
- # hconv:: [in] Handle to the conversation associated with the current transaction.
676
- # hsz1:: [in] Handle to a string. The meaning of this parameter depends on the type of the current transaction.
674
+ # uFmt:: <in> Specifies the format in which data is sent or received.
675
+ # hconv:: <in> Handle to the conversation associated with the current transaction.
676
+ # hsz1:: <in> Handle to a string. The meaning of this parameter depends on the type of the current transaction.
677
677
  # For the meaning of this parameter, see the description of the transaction type.
678
- # hsz2:: [in] Handle to a string. The meaning of this parameter depends on the type of the current transaction.
678
+ # hsz2:: <in> Handle to a string. The meaning of this parameter depends on the type of the current transaction.
679
679
  # For the meaning of this parameter, see the description of the transaction type.
680
- # hdata:: [in] Handle to DDE data. The meaning of this parameter depends on the type of the current transaction.
680
+ # hdata:: <in> Handle to DDE data. The meaning of this parameter depends on the type of the current transaction.
681
681
  # For the meaning of this parameter, see the description of the transaction type.
682
- # dwData1:: [in] Specifies transaction-specific data. For the meaning, see the description of the transaction type.
683
- # dwData2:: [in] Specifies transaction-specific data. For the meaning, see the description of the transaction type.
682
+ # dwData1:: <in> Specifies transaction-specific data. For the meaning, see the description of the transaction type.
683
+ # dwData2:: <in> Specifies transaction-specific data. For the meaning, see the description of the transaction type.
684
684
  # *Returns*:: The return value depends on the transaction class. For more information about the return values,
685
685
  # see descriptions of the individual transaction types.
686
686
  # ---
@@ -702,7 +702,7 @@ module Win
702
702
  #
703
703
  # [*Syntax*] UINT DdeInitialize( LPDWORD pidInst, PFNCALLBACK pfnCallback, DWORD afCmd, DWORD ulRes );
704
704
  #
705
- # pidInst:: [in, out] Pointer to the application instance identifier.
705
+ # pidInst:: <in, out> Pointer to the application instance identifier.
706
706
  # At initialization, this parameter should point to 0. If the function succeeds, this parameter points
707
707
  # to the instance identifier for the application. This value should be passed as the idInst parameter
708
708
  # in all other DDEML functions that require it. If an application uses multiple instances of the DDEML
@@ -711,7 +711,7 @@ module Win
711
711
  # case, pidInst must point to a valid application-instance identifier.
712
712
  # pfnCallback:: Pointer to the application-defined Dynamic Data Exchange DdeCallback function. This function
713
713
  # processes DDE transactions sent by the system. For more information, see the DdeCallback.
714
- # afCmd:: [in] Specifies a set of APPCMD_, CBF_, and MF_ flags. The APPCMD_ flags provide special
714
+ # afCmd:: <in> Specifies a set of APPCMD_, CBF_, and MF_ flags. The APPCMD_ flags provide special
715
715
  # instructions to DdeInitialize. The CBF_ flags specify filters that prevent specific types of transactions
716
716
  # from reaching the callback function. The MF_ flags specify the types of DDE activity that a DDE monitoring
717
717
  # application monitors. Using these flags enhances the performance of a DDE application by eliminating
@@ -767,7 +767,7 @@ module Win
767
767
  #
768
768
  # [*Syntax*] BOOL DdeUninitialize( DWORD idInst);
769
769
  #
770
- # idInst:: [in] Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
770
+ # idInst:: <in> Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
771
771
  # *Returns*:: If the function succeeds, the return value is nonzero.
772
772
  # If the function fails, the return value is zero.
773
773
  # ---
@@ -786,12 +786,12 @@ module Win
786
786
  #
787
787
  # [*Syntax*] HSZ DdeCreateStringHandle( DWORD idInst, LPTSTR psz, int iCodePage );
788
788
  #
789
- # idInst:: [in] Specifies the application instance identifier obtained by a previous call to the
789
+ # idInst:: <in> Specifies the application instance identifier obtained by a previous call to the
790
790
  # DdeInitialize function.
791
- # psz:: [in] Pointer to a buffer that contains the null-terminated string for which a handle
791
+ # psz:: <in> Pointer to a buffer that contains the null-terminated string for which a handle
792
792
  # is to be created. This string can be up to 255 characters. The reason for this limit is that
793
793
  # DDEML string management functions are implemented using global atoms.
794
- # iCodePage:: [in] Specifies the code page used to render the string. This value should be either
794
+ # iCodePage:: <in> Specifies the code page used to render the string. This value should be either
795
795
  # CP_WINANSI (the default code page) or CP_WINUNICODE, depending on whether the ANSI or Unicode
796
796
  # version of DdeInitialize was called by the client application.
797
797
  #
@@ -821,8 +821,8 @@ module Win
821
821
  #
822
822
  # [*Syntax*] BOOL DdeFreeStringHandle( DWORD idInst, HSZ hsz );
823
823
  #
824
- # idInst:: [in] Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
825
- # hsz:: [in, out] Handle to the string handle to be freed. This handle must have been created by a previous call
824
+ # idInst:: <in> Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
825
+ # hsz:: <in, out> Handle to the string handle to be freed. This handle must have been created by a previous call
826
826
  # to the DdeCreateStringHandle function.
827
827
  # *Returns*:: If the function succeeds, the return value is nonzero. If the function fails, it is zero.
828
828
  # ---
@@ -843,16 +843,16 @@ module Win
843
843
  #
844
844
  # [*Syntax*] DWORD DdeQueryString( DWORD idInst, HSZ hsz, LPTSTR psz, DWORD cchMax, int iCodePage);
845
845
  #
846
- # idInst:: [in] Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
847
- # hsz:: [in] Handle to the string to copy. This handle must have been created by a previous call to the
846
+ # idInst:: <in> Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
847
+ # hsz:: <in> Handle to the string to copy. This handle must have been created by a previous call to the
848
848
  # DdeCreateStringHandle function.
849
- # psz:: [in, out] Pointer to a buffer that receives the string. To obtain the length of the string, this parameter
849
+ # psz:: <in, out> Pointer to a buffer that receives the string. To obtain the length of the string, this parameter
850
850
  # should be set to NULL.
851
- # cchMax:: [in] Specifies the length, in TCHARs, of the buffer pointed to by the psz parameter. For the ANSI
851
+ # cchMax:: <in> Specifies the length, in TCHARs, of the buffer pointed to by the psz parameter. For the ANSI
852
852
  # version of the function, this is the number of bytes; for the Unicode version, this is the number of
853
853
  # characters. If the string is longer than ( cchMax– 1), it will be truncated. If the psz parameter is
854
854
  # set to NULL, this parameter is ignored.
855
- # iCodePage:: [in] Code page used to render the string. This value should be either CP_WINANSI or CP_WINUNICODE.
855
+ # iCodePage:: <in> Code page used to render the string. This value should be either CP_WINANSI or CP_WINUNICODE.
856
856
  #
857
857
  # *Returns*:: If the psz parameter specified a valid pointer, the return value is the length, in TCHARs, of the
858
858
  # returned text (not including the terminating null character). If the psz parameter specified a NULL
@@ -884,11 +884,11 @@ module Win
884
884
  #
885
885
  # [*Syntax*] HDDEDATA DdeNameService( DWORD idInst, UINT hsz1, UINT hsz2, UINT afCmd );
886
886
  #
887
- # idInst:: [in] Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
888
- # hsz1:: [in] Handle to the string that specifies the service name the server is registering or unregistering.
887
+ # idInst:: <in> Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
888
+ # hsz1:: <in> Handle to the string that specifies the service name the server is registering or unregistering.
889
889
  # An application that is unregistering all of its service names should set this parameter to 0L.
890
890
  # hsz2:: Reserved; should be set to 0L.
891
- # afCmd:: [in] Specifies the service name options. This parameter can be one of the following values.
891
+ # afCmd:: <in> Specifies the service name options. This parameter can be one of the following values.
892
892
  # DNS_REGISTER:: Registers the service name.
893
893
  # DNS_UNREGISTER:: Unregisters the service name. If the hsz1 parameter is 0L,
894
894
  # all service names registered by the server will be unregistered.
@@ -930,15 +930,15 @@ module Win
930
930
  #
931
931
  # [*Syntax*] HCONV DdeConnect( DWORD idInst, HSZ hszService, HSZ hszTopic, PCONVCONTEXT pCC );
932
932
  #
933
- # idInst:: [in] Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
934
- # hszService:: [in] Handle to the string that specifies the service name of the server application with which
933
+ # idInst:: <in> Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
934
+ # hszService:: <in> Handle to the string that specifies the service name of the server application with which
935
935
  # a conversation is to be established. This handle must have been created by a previous call to
936
936
  # the DdeCreateStringHandle function. If this parameter is 0L, a conversation is established with
937
937
  # any available server.
938
- # hszTopic:: [in] Handle to the string that specifies the name of the topic on which a conversation is to be
938
+ # hszTopic:: <in> Handle to the string that specifies the name of the topic on which a conversation is to be
939
939
  # established. This handle must have been created by a previous call to DdeCreateStringHandle.
940
940
  # If this parameter is 0L, a conversation on any topic supported by the selected server is established.
941
- # pCC:: [in] Pointer to the CONVCONTEXT structure that contains conversation context information. If this
941
+ # pCC:: <in> Pointer to the CONVCONTEXT structure that contains conversation context information. If this
942
942
  # parameter is NULL, the server receives the default CONVCONTEXT structure during the XTYP_CONNECT
943
943
  # or XTYP_WILDCONNECT transaction.
944
944
  # *Returns*:: If the function succeeds, the return value is the handle to the established conversation.
@@ -974,7 +974,7 @@ module Win
974
974
  #
975
975
  # [*Syntax*] BOOL DdeDisconnect( HCONV hConv );
976
976
  #
977
- # hConv:: [in, out] Handle to the active conversation to be terminated.
977
+ # hConv:: <in, out> Handle to the active conversation to be terminated.
978
978
  #
979
979
  # *Returns*:: If the function succeeds, the return value is nonzero, otherwise zero. The DdeGetLastError function
980
980
  # can be used to get the error code, which can be one of the following values:
@@ -1001,7 +1001,7 @@ module Win
1001
1001
  #
1002
1002
  # [*Syntax*] UINT DdeGetLastError( DWORD idInst );
1003
1003
  #
1004
- # idInst:: [in] Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
1004
+ # idInst:: <in> Specifies the application instance identifier obtained by a previous call to the DdeInitialize.
1005
1005
  #
1006
1006
  # *Returns*:: If the function succeeds, the return value is the last error code, which can be one of the following:
1007
1007
  # DMLERR_ADVACKTIMEOUT, DMLERR_EXECACKTIMEOUT, DMLERR_INVALIDPARAMETER, DMLERR_LOW_MEMORY, DMLERR_MEMORY_ERROR,
@@ -1024,27 +1024,27 @@ module Win
1024
1024
  # [*Syntax*] HDDEDATA DdeClientTransaction( LPBYTE pData, DWORD cbData, HCONV hConv, HSZ hszItem, UINT
1025
1025
  # wFmt, UINT wType, DWORD dwTimeout, LPDWORD pdwResult );
1026
1026
  #
1027
- # pData:: [in] Pointer to the beginning of the data the client must pass to the server.
1027
+ # pData:: <in> Pointer to the beginning of the data the client must pass to the server.
1028
1028
  # Optionally, an application can specify the data handle (HDDEDATA) to pass to the server and in that
1029
1029
  # case the cbData parameter should be set to -1. This parameter is required only if the wType parameter
1030
1030
  # is XTYP_EXECUTE or XTYP_POKE. Otherwise, this parameter should be NULL.
1031
1031
  # For the optional usage of this parameter, XTYP_POKE transactions where pData is a data handle, the
1032
1032
  # handle must have been created by a previous call to the DdeCreateDataHandle function, employing the
1033
1033
  # same data format specified in the wFmt parameter.
1034
- # cbData:: [in] Specifies the length, in bytes, of the data pointed to by the pData parameter, including
1034
+ # cbData:: <in> Specifies the length, in bytes, of the data pointed to by the pData parameter, including
1035
1035
  # the terminating NULL, if the data is a string. A value of -1 indicates that pData is a data
1036
1036
  # handle that identifies the data being sent.
1037
- # hConv:: [in] Handle to the conversation in which the transaction is to take place.
1038
- # hszItem:: [in] Handle to the data item for which data is being exchanged during the transaction. This
1037
+ # hConv:: <in> Handle to the conversation in which the transaction is to take place.
1038
+ # hszItem:: <in> Handle to the data item for which data is being exchanged during the transaction. This
1039
1039
  # handle must have been created by a previous call to the DdeCreateStringHandle function. This
1040
1040
  # parameter is ignored (and should be set to 0L) if the wType parameter is XTYP_EXECUTE.
1041
- # wFmt:: [in] Specifies the standard clipboard format in which the data item is being submitted or
1041
+ # wFmt:: <in> Specifies the standard clipboard format in which the data item is being submitted or
1042
1042
  # requested. If the transaction specified by the wType parameter does not pass data or is XTYP_EXECUTE,
1043
1043
  # this parameter should be zero.
1044
1044
  # If the transaction specified by the wType parameter references non-execute DDE data ( XTYP_POKE,
1045
1045
  # XTYP_ADVSTART, XTYP_ADVSTOP, XTYP_REQUEST), the wFmt value must be either a valid predefined (CF_) DDE
1046
1046
  # format or a valid registered clipboard format.
1047
- # wType:: [in] Specifies the transaction type. This parameter can be one of the following values.
1047
+ # wType:: <in> Specifies the transaction type. This parameter can be one of the following values.
1048
1048
  # - XTYP_ADVSTART: Begins an advise loop. Any number of distinct advise loops can exist within a
1049
1049
  # conversation. An application can alter the advise loop type by combining the XTYP_ADVSTART
1050
1050
  # transaction type with one or more of the following flags: Flag Meaning
@@ -1058,10 +1058,10 @@ module Win
1058
1058
  # - XTYP_EXECUTE: Begins an execute transaction.
1059
1059
  # - XTYP_POKE: Begins a poke transaction.
1060
1060
  # - XTYP_REQUEST: Begins a request transaction.
1061
- # dwTimeout:: [in] Specifies the maximum amount of time, in milliseconds, that the client will wait for
1061
+ # dwTimeout:: <in> Specifies the maximum amount of time, in milliseconds, that the client will wait for
1062
1062
  # a response from the server application in a synchronous transaction. This parameter should
1063
1063
  # be TIMEOUT_ASYNC for asynchronous transactions.
1064
- # pdwResult:: [out] Pointer to a variable that receives the result of the transaction. An application
1064
+ # pdwResult:: <out> Pointer to a variable that receives the result of the transaction. An application
1065
1065
  # that does not check the result can use NULL for this value. For synchronous transactions,
1066
1066
  # the low-order word of this variable contains any applicable DDE_ flags resulting from the
1067
1067
  # transaction. This provides support for applications dependent on DDE_APPSTATUS bits. It
@@ -1125,12 +1125,12 @@ module Win
1125
1125
  #
1126
1126
  # [*Syntax*] DWORD DdeGetData( HDDEDATA hData, LPBYTE pDst, DWORD cbMax, DWORD cbOff );
1127
1127
  #
1128
- # hData:: [in] Handle to the DDE object that contains the data to copy.
1129
- # pDst:: [out] Pointer to the buffer that receives the data. If this parameter is NULL, the DdeGetData
1128
+ # hData:: <in> Handle to the DDE object that contains the data to copy.
1129
+ # pDst:: <out> Pointer to the buffer that receives the data. If this parameter is NULL, the DdeGetData
1130
1130
  # function returns the amount of data, in bytes, that would be copied to the buffer.
1131
- # cbMax:: [in] Specifies the maximum amount of data, in bytes, to copy to the buffer pointed to by the pDst
1131
+ # cbMax:: <in> Specifies the maximum amount of data, in bytes, to copy to the buffer pointed to by the pDst
1132
1132
  # parameter. Typically, this parameter specifies the length of the buffer pointed to by pDst.
1133
- # cbOff:: [in] Specifies an offset within the DDE object. Data is copied from the object beginning at this offset.
1133
+ # cbOff:: <in> Specifies an offset within the DDE object. Data is copied from the object beginning at this offset.
1134
1134
  #
1135
1135
  # *Returns*:: If the pDst parameter points to a buffer, return value is the size, in bytes, of the memory object
1136
1136
  # associated with the data handle or the size specified in the cbMax parameter, whichever is lower.
@@ -1171,8 +1171,8 @@ module Win
1171
1171
  #
1172
1172
  # [*Syntax*] LPBYTE DdeAccessData( HDDEDATA hData, LPDWORD pcbDataSize );
1173
1173
  #
1174
- # hData:: [in] Handle to the DDE object to access.
1175
- # pcbDataSize:: [out] Pointer to a variable that receives the size, in bytes, of the DDE object
1174
+ # hData:: <in> Handle to the DDE object to access.
1175
+ # pcbDataSize:: <out> Pointer to a variable that receives the size, in bytes, of the DDE object
1176
1176
  # identified by the hData parameter. If this parameter is NULL, no size information is
1177
1177
  # returned.
1178
1178
  #
@@ -1212,7 +1212,7 @@ module Win
1212
1212
  #
1213
1213
  # [*Syntax*] BOOL DdeUnaccessData( HDDEDATA hData );
1214
1214
  #
1215
- # hData:: [in] Handle to the DDE object.
1215
+ # hData:: <in> Handle to the DDE object.
1216
1216
  #
1217
1217
  # *Returns*:: If the function succeeds, the return value is nonzero.
1218
1218
  # If the function fails, the return value is zero.
data/lib/win/error.rb CHANGED
@@ -870,7 +870,7 @@ module Win
870
870
  # [*Syntax*] DWORD WINAPI FormatMessage( DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD
871
871
  # dwLanguageId, LPTSTR lpBuffer, DWORD nSize, va_list* Arguments );
872
872
  #
873
- # dwFlags:: [in] The formatting options, and how to interpret the lpSource parameter. The low-order byte of dwFlags
873
+ # dwFlags:: <in> The formatting options, and how to interpret the lpSource parameter. The low-order byte of dwFlags
874
874
  # specifies how the function handles line breaks in the output buffer. The low-order byte can also
875
875
  # specify the maximum width of a formatted output line. Possible values:
876
876
  # - FORMAT_MESSAGE_ALLOCATE_BUFFER - The lpBuffer parameter is a pointer to a PVOID pointer, and that
@@ -1075,7 +1075,7 @@ module Win
1075
1075
  #
1076
1076
  # [*Syntax*] void WINAPI SetLastError( DWORD dwErrCode );
1077
1077
  #
1078
- # dwErrCode:: [in] The last-error code for the thread.
1078
+ # dwErrCode:: <in> The last-error code for the thread.
1079
1079
  #
1080
1080
  # *Returns*:: This function does not return a value.
1081
1081
  # ---
@@ -14,8 +14,8 @@ module Win
14
14
  #
15
15
  # [*Syntax*] HWND GetDlgItem( HWND hDlg, int nIDDlgItem );
16
16
  #
17
- # hDlg:: [in] Handle to the dialog box that contains the control.
18
- # nIDDlgItem:: [in] Specifies the identifier of the control to be retrieved.
17
+ # hDlg:: <in> Handle to the dialog box that contains the control.
18
+ # nIDDlgItem:: <in> Specifies the identifier of the control to be retrieved.
19
19
  # *Returns*:: If the function succeeds, the return value is the window handle of the specified control.
20
20
  # If the function fails, the return value is NULL, indicating an invalid dialog box handle
21
21
  # or a nonexistent control. To get extended error information, call GetLastError.
data/lib/win/gui/input.rb CHANGED
@@ -139,13 +139,13 @@ module Win
139
139
  #
140
140
  # [*Syntax*] VOID keybd_event( BYTE bVk, BYTE bScan, DWORD dwFlags, PTR dwExtraInfo);
141
141
  #
142
- # bVk:: [in] Specifies a virtual-key code. The code must be a value in the range 1 to 254.
142
+ # bVk:: <in> Specifies a virtual-key code. The code must be a value in the range 1 to 254.
143
143
  # For a complete list, see Virtual-Key Codes.
144
- # bScan:: [in] Specifies a hardware scan code for the key.
145
- # dwFlags:: [in] Specifies various aspects of function operation. This parameter can be
144
+ # bScan:: <in> Specifies a hardware scan code for the key.
145
+ # dwFlags:: <in> Specifies various aspects of function operation. This parameter can be
146
146
  # one or more of the following values:
147
147
  # KEYEVENTF_EXTENDEDKEY, KEYEVENTF_KEYUP, KEYEVENTF_KEYDOWN
148
- # dwExtraInfo:: [in] Specifies an additional value associated with the key stroke.
148
+ # dwExtraInfo:: <in> Specifies an additional value associated with the key stroke.
149
149
  #
150
150
  # <b>NO Return Value</b>
151
151
  # ---
@@ -168,7 +168,7 @@ module Win
168
168
  #
169
169
  # [*Syntax*] VOID mouse_event( DWORD dwFlags, DWORD dx, DWORD dy, DWORD dwData, ULONG_PTR dwExtraInfo );
170
170
  #
171
- # dwFlags:: [in] Specifies various aspects of mouse motion and button clicking. This parameter can be certain
171
+ # dwFlags:: <in> Specifies various aspects of mouse motion and button clicking. This parameter can be certain
172
172
  # combinations of the following values. The values that specify mouse button status are set to indicate
173
173
  # changes in status, not ongoing conditions. For example, if the left mouse button is pressed and
174
174
  # held down, MOUSEEVENTF_LEFTDOWN is set when the left button is first pressed, but not for subsequent
@@ -178,14 +178,14 @@ module Win
178
178
  # MOUSEEVENTF_ABSOLUTE, MOUSEEVENTF_MOVE, MOUSEEVENTF_LEFTDOWN, MOUSEEVENTF_LEFTUP,
179
179
  # MOUSEEVENTF_RIGHTDOWN, MOUSEEVENTF_RIGHTUP, MOUSEEVENTF_MIDDLEDOWN, MOUSEEVENTF_MIDDLEUP,
180
180
  # MOUSEEVENTF_WHEEL, MOUSEEVENTF_XDOWN, MOUSEEVENTF_XUP
181
- # dx:: [in] Specifies the mouse's absolute position along the x-axis or its amount of motion since the
181
+ # dx:: <in> Specifies the mouse's absolute position along the x-axis or its amount of motion since the
182
182
  # last mouse event was generated, depending on the setting of MOUSEEVENTF_ABSOLUTE. Absolute data is
183
183
  # specified as the mouse's actual x-coordinate; relative data is specified as the number of mickeys moved.
184
184
  # A mickey is the amount that a mouse has to move for it to report that it has moved.
185
- # dy:: [in] Specifies the mouse's absolute position along the y-axis or its amount of motion since the
185
+ # dy:: <in> Specifies the mouse's absolute position along the y-axis or its amount of motion since the
186
186
  # last mouse event was generated, depending on the setting of MOUSEEVENTF_ABSOLUTE. Absolute data is
187
187
  # specified as the mouse's actual y-coordinate; relative data is specified as the number of mickeys moved.
188
- # dwData:: [in]
188
+ # dwData:: <in>
189
189
  # - If dwFlags contains MOUSEEVENTF_WHEEL, then data specifies the amount of wheel movement.
190
190
  # A positive value indicates that the wheel was rotated forward, away from the user; a negative value
191
191
  # indicates that the wheel was rotated backward, toward the user. One wheel click is defined as
@@ -198,7 +198,7 @@ module Win
198
198
  # - If flags is not MOUSEEVENTF_WHEEL, MOUSEEVENTF_XDOWN, or MOUSEEVENTF_XUP, then data should be zero.
199
199
  # XBUTTON1 - Set if the first X button was pressed or released.
200
200
  # XBUTTON2 - Set if the second X button was pressed or released.
201
- # dwExtraInfo:: [in] Specifies an additional value associated with the mouse event. An application
201
+ # dwExtraInfo:: <in> Specifies an additional value associated with the mouse event. An application
202
202
  # calls GetMessageExtraInfo to obtain this extra information.
203
203
  # <b>NO Return Value</b>
204
204
  # ---
@@ -245,8 +245,8 @@ module Win
245
245
  #
246
246
  # [*Syntax*] BOOL SetCursorPos( int X, int Y );
247
247
  #
248
- # X:: [in] Specifies the new x-coordinate of the cursor, in screen coordinates.
249
- # Y:: [in] Specifies the new y-coordinate of the cursor, in screen coordinates.
248
+ # X:: <in> Specifies the new x-coordinate of the cursor, in screen coordinates.
249
+ # Y:: <in> Specifies the new y-coordinate of the cursor, in screen coordinates.
250
250
  #
251
251
  # *Returns*:: Nonzero(*true*) if successful or zero(*false*) otherwise. To get extended error information,
252
252
  # call GetLastError. Enhanced to return true/false instead of nonzero/zero
@@ -267,7 +267,7 @@ module Win
267
267
  #
268
268
  # [*Syntax*] BOOL GetCursorPos( LPPOINT lpPoint );
269
269
  #
270
- # lpPoint:: [out] Pointer to a POINT structure that receives the screen coordinates of the cursor.
270
+ # lpPoint:: <out> Pointer to a POINT structure that receives the screen coordinates of the cursor.
271
271
  #
272
272
  # *Returns*:: Returns nonzero if successful or zero otherwise. To get extended error information, call
273
273
  # GetLastError.
@@ -342,12 +342,12 @@ module Win
342
342
  #
343
343
  # [*Syntax*] VOID SendAsyncProc( HWND hwnd, UINT uMsg, ULONG_PTR dwData, LRESULT lResult );
344
344
  #
345
- # hwnd:: [in] Handle to the window whose window procedure received the message. If SendMessageCallback
345
+ # hwnd:: <in> Handle to the window whose window procedure received the message. If SendMessageCallback
346
346
  # function was called with its hwnd parameter set to HWND_BROADCAST, the system calls the
347
347
  # SendAsyncProc function once for each top-level window.
348
- # uMsg:: [in] Specifies the message.
349
- # dwData:: [in] Specifies an application-defined value sent from the SendMessageCallback function.
350
- # lResult:: [in] Specifies the result of the message processing. This value depends on the message.
348
+ # uMsg:: <in> Specifies the message.
349
+ # dwData:: <in> Specifies an application-defined value sent from the SendMessageCallback function.
350
+ # lResult:: <in> Specifies the result of the message processing. This value depends on the message.
351
351
  #
352
352
  # :call-seq:
353
353
  # SendAsyncProc callback block: {|handle, msg, data, l_result| your callback code }
@@ -363,16 +363,16 @@ module Win
363
363
  # [*Syntax*] BOOL SendMessageCallback( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam,
364
364
  # SENDASYNCPROC lpCallBack, ULONG_PTR dwData);
365
365
  #
366
- # hWnd:: [in] Handle to the window whose window procedure will receive the message. If this parameter is
366
+ # hWnd:: <in> Handle to the window whose window procedure will receive the message. If this parameter is
367
367
  # HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or
368
368
  # invisible, unowned, overlapped and pop-up windows; but the message is not sent to child windows.
369
- # Msg:: [in] Specifies the message to be sent.
370
- # wParam:: [in] Specifies additional message-specific information.
371
- # lParam:: [in] Specifies additional message-specific information.
372
- # lpCallBack:: [in] Pointer to a callback function that the system calls after the window procedure processes
369
+ # Msg:: <in> Specifies the message to be sent.
370
+ # wParam:: <in> Specifies additional message-specific information.
371
+ # lParam:: <in> Specifies additional message-specific information.
372
+ # lpCallBack:: <in> Pointer to a callback function that the system calls after the window procedure processes
373
373
  # the message. For more information, see SendAsyncProc. If hWnd is HWND_BROADCAST, the system calls
374
374
  # SendAsyncProc callback function once for each top-level window.
375
- # dwData:: [in] Specifies an application-defined value to be sent to the callback function pointed to by
375
+ # dwData:: <in> Specifies an application-defined value to be sent to the callback function pointed to by
376
376
  # the lpCallBack parameter.
377
377
  # *Returns*:: Nonzero if the function succeeds, zero if it fails. For extended error info, call GetLastError.
378
378
  # ---
@@ -404,14 +404,14 @@ module Win
404
404
  #
405
405
  # [*Syntax*] BOOL PostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
406
406
  #
407
- # hWnd:: [in] Handle to the window whose window procedure will receive the message. If this parameter is
407
+ # hWnd:: <in> Handle to the window whose window procedure will receive the message. If this parameter is
408
408
  # HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or
409
409
  # invisible unowned windows, overlapped windows, and pop-up windows; but the message is not posted to
410
410
  # child windows. If it is NULL, the function behaves like a call to PostThreadMessage()
411
411
  # with the dwThreadId parameter set to the identifier of the current thread.
412
- # Msg:: [in] Specifies the message to be posted.
413
- # wParam:: [in] Specifies additional message-specific information.
414
- # lParam:: [in] Specifies additional message-specific information.
412
+ # Msg:: <in> Specifies the message to be posted.
413
+ # wParam:: <in> Specifies additional message-specific information.
414
+ # lParam:: <in> Specifies additional message-specific information.
415
415
  #
416
416
  # *Returns*:: Nonzero if the function succeeds, zero if it fails. For extended error info, call GetLastError.
417
417
  # ---
@@ -444,16 +444,16 @@ module Win
444
444
  #
445
445
  # [*Syntax*] LRESULT SendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
446
446
  #
447
- # hWnd:: [in] Handle to the window whose window procedure will receive the message. If this parameter is
447
+ # hWnd:: <in> Handle to the window whose window procedure will receive the message. If this parameter is
448
448
  # HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or
449
449
  # invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to
450
450
  # child windows.
451
451
  # Microsoft Windows Vista and later. Message sending is subject to User Interface Privilege Isolation
452
452
  # (UIPI). The thread of a process can send messages only to message queues of threads in processes of
453
453
  # lesser or equal integrity level.
454
- # Msg:: [in] Specifies the message to be sent.
455
- # wParam:: [in] Specifies additional message-specific information.
456
- # lParam:: [in/out?] Specifies additional message-specific information.
454
+ # Msg:: <in> Specifies the message to be sent.
455
+ # wParam:: <in> Specifies additional message-specific information.
456
+ # lParam:: <in/out?> Specifies additional message-specific information.
457
457
  #
458
458
  # *Return*:: The return value specifies the result of the message processing; it depends on the message sent.
459
459
  # ---
@@ -512,21 +512,21 @@ module Win
512
512
  #
513
513
  # [*Syntax*] BOOL GetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax );
514
514
  #
515
- # lpMsg:: [out] Pointer to an MSG structure that receives message information from the thread's message
515
+ # lpMsg:: <out> Pointer to an MSG structure that receives message information from the thread's message
516
516
  # queue.
517
- # hWnd:: [in] Handle to the window whose messages are to be retrieved. The window must belong to the current
517
+ # hWnd:: <in> Handle to the window whose messages are to be retrieved. The window must belong to the current
518
518
  # thread. If hWnd is NULL, GetMessage retrieves messages for any window that belongs to the current
519
519
  # thread, and any messages on the current thread's message queue whose hwnd value is NULL (see the MSG
520
520
  # structure). Therefore if hWnd is NULL, both window messages and thread messages are processed.
521
521
  # If hWnd is -1, GetMessage retrieves only messages on the current thread's message queue whose hwnd
522
522
  # value is NULL, that is, thread messages as posted by PostMessage (when the hWnd parameter is NULL) or
523
523
  # PostThreadMessage.
524
- # wMsgFilterMin:: [in] Specifies the integer value of the lowest message value to be retrieved. Use WM_KEYFIRST
524
+ # wMsgFilterMin:: <in> Specifies the integer value of the lowest message value to be retrieved. Use WM_KEYFIRST
525
525
  # to specify the first keyboard message or WM_MOUSEFIRST to specify the first mouse message.
526
526
  # Windows XP: Use WM_INPUT here and in wMsgFilterMax to specify only the WM_INPUT messages.
527
527
  # If wMsgFilterMin and wMsgFilterMax are both zero, GetMessage returns all available messages
528
528
  # (that is, no range filtering is performed).
529
- # wMsgFilterMax:: [in] Specifies the integer value of the highest message value to be retrieved. Use
529
+ # wMsgFilterMax:: <in> Specifies the integer value of the highest message value to be retrieved. Use
530
530
  # WM_KEYLAST to specify the last keyboard message or WM_MOUSELAST to specify the last
531
531
  # mouse message.
532
532
  #
@@ -606,22 +606,22 @@ module Win
606
606
  # [*Syntax*] BOOL PeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax,
607
607
  # UINT wRemoveMsg );
608
608
  #
609
- # lpMsg:: [out] Pointer to an MSG structure that receives message information.
610
- # hWnd:: [in] Handle to the window whose messages are to be retrieved. The window must belong to the current
609
+ # lpMsg:: <out> Pointer to an MSG structure that receives message information.
610
+ # hWnd:: <in> Handle to the window whose messages are to be retrieved. The window must belong to the current
611
611
  # thread. If hWnd is NULL, PeekMessage retrieves messages for any window that belongs to the current
612
612
  # thread, and any messages on the current thread's message queue whose hwnd value is NULL (see MSG).
613
613
  # Therefore if hWnd is NULL, both window messages and thread messages are processed.
614
614
  # If hWnd is -1, PeekMessage retrieves only messages on the current thread's message queue whose hwnd
615
615
  # value is NULL, that is, thread messages as posted by PostMessage (when the hWnd parameter is NULL) or
616
616
  # PostThreadMessage.
617
- # wMsgFilterMin:: [in] Specifies the value of the first message in the range of messages to be examined.
617
+ # wMsgFilterMin:: <in> Specifies the value of the first message in the range of messages to be examined.
618
618
  # Use WM_KEYFIRST to specify the first keyboard message or WM_MOUSEFIRST to specify the
619
619
  # first mouse message. If wMsgFilterMin and wMsgFilterMax are both zero, PeekMessage returns all
620
620
  # available messages (that is, no range filtering is performed).
621
- # wMsgFilterMax:: [in] Specifies the value of the last message in the range of messages to be examined.
621
+ # wMsgFilterMax:: <in> Specifies the value of the last message in the range of messages to be examined.
622
622
  # Use WM_KEYLAST to specify the last keyboard message or WM_MOUSELAST to specify the
623
623
  # last mouse message.
624
- # wRemoveMsg:: [in] Specifies how messages are handled. This parameter can be one of the following values.
624
+ # wRemoveMsg:: <in> Specifies how messages are handled. This parameter can be one of the following values.
625
625
  # - PM_NOREMOVE - Messages are not removed from the queue after processing by PeekMessage.
626
626
  # - PM_REMOVE - Messages are removed from the queue after processing by PeekMessage.
627
627
  # You can optionally combine the value PM_NOYIELD with either PM_NOREMOVE or PM_REMOVE. This flag
@@ -687,7 +687,7 @@ module Win
687
687
  #
688
688
  # [*Syntax*] BOOL TranslateMessage( const MSG *lpMsg );
689
689
  #
690
- # lpMsg:: [in] Pointer to an MSG structure that contains message information retrieved from the calling
690
+ # lpMsg:: <in> Pointer to an MSG structure that contains message information retrieved from the calling
691
691
  # thread's message queue by using the GetMessage or PeekMessage function.
692
692
  #
693
693
  # *Returns*:: If the message is translated (that is, a character message is posted to the thread's
@@ -726,7 +726,7 @@ module Win
726
726
  #
727
727
  # [*Syntax*] LRESULT DispatchMessage( const MSG *lpmsg );
728
728
  #
729
- # lpmsg:: [in] Pointer to an MSG structure that contains the message.
729
+ # lpmsg:: <in> Pointer to an MSG structure that contains the message.
730
730
  #
731
731
  # *Returns*:: The return value specifies the value returned by the window procedure. Although its
732
732
  # meaning depends on the message being dispatched, the return value generally is ignored.