1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* win32ole.c: add RDoc style comment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
suke 2004-05-08 03:54:51 +00:00
parent ac5f6e0a60
commit 3a8d8654f7

View file

@ -1727,6 +1727,24 @@ fole_s_show_help(argc, argv, self)
return Qnil; return Qnil;
} }
/*
* Document-class: WIN32OLE
*
* <code>WIN32OLE</code> objects represent OLE Automation object in the Ruby.
*/
/*
* call-seq:
* WIN32OLE.new(server, [host]) -> WIN32OLE object
*
* Returns a new WIN32OLE object(OLE Automation object).
* The first argument server specifies OLE Automation server.
* The first argument should be CLSID or PROGID.
* If second argument host specified, then returns OLE Automation
* object on host.
*
* WIN32OLE.new('Excel.Application') #=> Excel OLE Automation object.
*/
static VALUE static VALUE
fole_initialize(argc, argv, self) fole_initialize(argc, argv, self)
int argc; int argc;
@ -2015,6 +2033,16 @@ ole_invoke(argc, argv, self, wFlags)
return obj; return obj;
} }
/*
* call-seq:
* WIN32OLE#invoke(method, [arg1,...]) => return value of method.
*
* Runs OLE method.
*
* The first argument specifies the method name of OLE Automation object.
* The others specify argument of the <i>method</i>.
*
*/
static VALUE static VALUE
fole_invoke(argc, argv, self) fole_invoke(argc, argv, self)
int argc; int argc;
@ -2357,6 +2385,15 @@ ole_propertyput(self, property, value)
return Qnil; return Qnil;
} }
/*
* call-seq:
* WIN32OLE#ole_free
*
* invokes Release method of Dispatch interface of WIN32OLE object.
* Usually, you do not need to call this method because Release method
* called automatically when WIN32OLE object garbaged.
*
*/
static VALUE static VALUE
fole_free(self) fole_free(self)
VALUE self; VALUE self;
@ -3201,6 +3238,23 @@ oleclass_from_typelib(self, pTypeLib, oleclass)
return found; return found;
} }
/*
* Document-class: WIN32OLE_TYPE
*
* <code>WIN32OLE_TYPE</code> objects represent OLE type libarary information.
*/
/*
* call-seq:
* WIN32OLE_TYPE.new(typelib, ole_class) -> WIN32OLE_TYPE object
*
* Returns a new WIN32OLE_TYPE object.
* The first argument <i>typelib</i> specifies OLE type library name.
* The second argument specifies OLE class name.
*
* WIN32OLE.new('Microsoft Excel 9.0 Object Library', 'Application')
* #=> WIN32OLE_TYPE object of Application class of Excel.
*/
static VALUE static VALUE
foletype_initialize(self, typelib, oleclass) foletype_initialize(self, typelib, oleclass)
VALUE self; VALUE self;
@ -3233,9 +3287,10 @@ foletype_initialize(self, typelib, oleclass)
} }
/* /*
* WIN32OLE_TYPE#name * call-seq:
* --- * WIN32OLE_TYPE#name #=> OLE type name
* Returns name. *
* Returns OLE type name.
*/ */
static VALUE static VALUE
foletype_name(self) foletype_name(self)
@ -3292,9 +3347,10 @@ ole_ole_type(pTypeInfo)
} }
/* /*
* WIN32OLE_TYPE#ole_type * call-seq:
* ---- * WIN32OLE_TYPE#ole_type #=> OLE type string.
* returns type of class. *
* returns type of OLE class.
*/ */
static VALUE static VALUE
foletype_ole_type(self) foletype_ole_type(self)
@ -3326,8 +3382,9 @@ ole_type_guid(pTypeInfo)
} }
/* /*
* WIN32OLE_TYPE#guid * call-seq:
* ---- * WIN32OLE_TYPE#guid #=> GUID
*
* Returns GUID. * Returns GUID.
*/ */
static VALUE static VALUE
@ -3358,8 +3415,9 @@ ole_type_progid(pTypeInfo)
} }
/* /*
* WIN32OLE_TYPE#progid * call-seq:
* ---- * WIN32OLE_TYPE#progid #=> ProgID
*
* Returns ProgID if it exists. If not found, then returns nil. * Returns ProgID if it exists. If not found, then returns nil.
*/ */
static VALUE static VALUE
@ -3392,9 +3450,10 @@ ole_type_visible(pTypeInfo)
} }
/* /*
* WIN32OLE_TYPE#visible * call-seq:
* ---- * WIN32OLE_TYPE#visible #=> true or false
* returns true if the OLE class is public. *
* Returns true if the OLE class is public.
*/ */
static VALUE static VALUE
foletype_visible(self) foletype_visible(self)
@ -3421,8 +3480,9 @@ ole_type_major_version(pTypeInfo)
} }
/* /*
* call-seq:
* WIN32OLE_TYPE#major_version * WIN32OLE_TYPE#major_version
* ---- *
* Returns major version. * Returns major version.
*/ */
static VALUE static VALUE
@ -3450,8 +3510,9 @@ ole_type_minor_version(pTypeInfo)
} }
/* /*
* WIN32OLE_TYPE#minor_version * call-seq:
* ---- * WIN32OLE_TYPE#minor_version #=> OLE minor version
*
* Returns minor version. * Returns minor version.
*/ */
static VALUE static VALUE
@ -3479,8 +3540,9 @@ ole_type_typekind(pTypeInfo)
} }
/* /*
* WIN32OLE_TYPE#typekind * call-seq:
* ---- * WIN32OLE_TYPE#typekind #=> number of type.
*
* Returns number which represents type. * Returns number which represents type.
*/ */
static VALUE static VALUE
@ -3506,8 +3568,9 @@ ole_type_helpstring(pTypeInfo)
} }
/* /*
* WIN32OLE_TYPE#helpstring * call-seq:
* --- * WIN32OLE_TYPE#helpstring #=> help string.
*
* Returns help string. * Returns help string.
*/ */
static VALUE static VALUE
@ -3539,8 +3602,9 @@ ole_type_src_type(pTypeInfo)
} }
/* /*
* WIN32OLE_TYPE#src_type * call-seq:
* ---- * WIN32OLE_TYPE#src_type #=> OLE source class
*
* Returns source class when the OLE class is 'Alias'. * Returns source class when the OLE class is 'Alias'.
*/ */
static VALUE static VALUE
@ -3566,8 +3630,9 @@ ole_type_helpfile(pTypeInfo)
} }
/* /*
* call-seq:
* WIN32OLE_TYPE#helpfile * WIN32OLE_TYPE#helpfile
* ---- *
* Returns helpfile * Returns helpfile
*/ */
static VALUE static VALUE
@ -3593,8 +3658,9 @@ ole_type_helpcontext(pTypeInfo)
} }
/* /*
* call-seq:
* WIN32OLE_TYPE#helpcontext * WIN32OLE_TYPE#helpcontext
* --- *
* Returns helpcontext. * Returns helpcontext.
*/ */
static VALUE static VALUE
@ -3652,9 +3718,11 @@ ole_variables(pTypeInfo)
} }
/* /*
* call-seq:
* WIN32OLE_TYPE#variables * WIN32OLE_TYPE#variables
* ---- *
* Returns array of variables defined in OLE class. * Returns array of WIN32OLE_VARIABLE objects which represent variables
* defined in OLE class.
*/ */
static VALUE static VALUE
foletype_variables(self) foletype_variables(self)
@ -3666,9 +3734,11 @@ foletype_variables(self)
} }
/* /*
* WIN32OLE_TYPE#ole_methods * call-seq:
* ---- * WIN32OLE_TYPE#ole_methods # the array of WIN32OLE_METHOD objects.
* Returns array of WIN32OLE_METHOD objects. *
* Returns array of WIN32OLE_METHOD objects which represent OLE method defined in
* OLE type library.
*/ */
static VALUE static VALUE
foletype_methods(argc, argv, self) foletype_methods(argc, argv, self)
@ -3682,8 +3752,9 @@ foletype_methods(argc, argv, self)
} }
/* /*
* call-seq:
* WIN32OLE_VARIABLE#name * WIN32OLE_VARIABLE#name
* --- *
* Returns the name. * Returns the name.
*/ */
static VALUE static VALUE
@ -3924,6 +3995,16 @@ folemethod_s_allocate(klass)
return obj; return obj;
} }
/*
* call-seq:
* WIN32OLE_METHOD.new(ole_type, method) -> WIN32OLE_METHOD object
*
* Returns a new WIN32OLE_METHOD object which represents the information
* about OLE method.
* The first argument <i>ole_type</i> specifies WIN32OLE_TYPE object.
* The second argument <i>method</i> specifies OLE method name defined OLE class
* which represents WIN32OLE_TYPE object.
*/
static VALUE static VALUE
folemethod_initialize(self, oletype, method) folemethod_initialize(self, oletype, method)
VALUE self; VALUE self;
@ -4242,6 +4323,12 @@ folemethod_event(self)
rb_ivar_get(self, rb_intern("name"))); rb_ivar_get(self, rb_intern("name")));
} }
/*
* call-seq:
* WIN32OLE_METHOD#event_interface
*
* Returns event interface name if the method is event.
*/
static VALUE static VALUE
folemethod_event_interface(self) folemethod_event_interface(self)
VALUE self; VALUE self;
@ -4294,6 +4381,12 @@ ole_method_helpstring(pTypeInfo, method_index)
return WC2VSTR(bhelpstring); return WC2VSTR(bhelpstring);
} }
/*
* call-seq:
* WIN32OLE_METHOD#helpstring
*
* Returns help string of OLE method.
*/
static VALUE static VALUE
folemethod_helpstring(self) folemethod_helpstring(self)
VALUE self; VALUE self;
@ -4450,11 +4543,6 @@ folemethod_size_params(self)
return ole_method_size_params(pmethod->pTypeInfo, pmethod->index); return ole_method_size_params(pmethod->pTypeInfo, pmethod->index);
} }
/*
* WIN32OLE_METHOD#size_opt_params
* ----
* Returns the size of optional parameters.
*/
static VALUE static VALUE
ole_method_size_opt_params(pTypeInfo, method_index) ole_method_size_opt_params(pTypeInfo, method_index)
ITypeInfo *pTypeInfo; ITypeInfo *pTypeInfo;
@ -4471,6 +4559,12 @@ ole_method_size_opt_params(pTypeInfo, method_index)
return size_opt_params; return size_opt_params;
} }
/*
* call-seq:
* WIN32OLE_METHOD#size_opt_params
*
* Returns the size of optional parameters.
*/
static VALUE static VALUE
folemethod_size_opt_params(self) folemethod_size_opt_params(self)
VALUE self; VALUE self;
@ -4566,6 +4660,12 @@ ole_param_ole_type(pTypeInfo, method_index, index)
return type; return type;
} }
/*
* call-seq:
* WIN32OLE_PARAM#ole_type
*
* Returns OLE type of WIN32OLE_PARAM object(parameter of OLE method).
*/
static VALUE static VALUE
foleparam_ole_type(self) foleparam_ole_type(self)
VALUE self; VALUE self;
@ -4594,6 +4694,11 @@ ole_param_ole_type_detail(pTypeInfo, method_index, index)
return typedetail; return typedetail;
} }
/*
* call-seq:
* WIN32OLE_PARAM#ole_type_detail
* Returns detail information of type of argument.
*/
static VALUE static VALUE
foleparam_ole_type_detail(self) foleparam_ole_type_detail(self)
VALUE self; VALUE self;
@ -4665,6 +4770,12 @@ static VALUE foleparam_optional(self)
pparam->index, PARAMFLAG_FOPT); pparam->index, PARAMFLAG_FOPT);
} }
/*
* call-seq:
* WIN32OLE_PARAM#retval?
*
* Returns true if argument is return value.
*/
static VALUE foleparam_retval(self) static VALUE foleparam_retval(self)
VALUE self; VALUE self;
{ {
@ -5246,6 +5357,14 @@ fev_s_allocate(klass)
return obj; return obj;
} }
/*
* call-seq:
* WIN32OLE_EVENT.new(ole, event) #=> WIN32OLE_EVENT object.
*
* Returns OLE event object.
* The first argument specifies WIN32OLE object.
* The second argument specifies OLE event name.
*/
static VALUE static VALUE
fev_initialize(argc, argv, self) fev_initialize(argc, argv, self)
int argc; int argc;
@ -5329,8 +5448,9 @@ fev_initialize(argc, argv, self)
} }
/* /*
* call-seq:
* WIN32OLE_EVENT.message_loop * WIN32OLE_EVENT.message_loop
* --- *
* Translates and dispatches Windows message. * Translates and dispatches Windows message.
*/ */
static VALUE static VALUE
@ -5373,9 +5493,10 @@ ev_on_event(argc, argv, self, is_ary_arg)
} }
/* /*
* call-seq:
* WIN32OLE_EVENT#on_event([event]){...} * WIN32OLE_EVENT#on_event([event]){...}
* ---- *
* defines the callback event. * Defines the callback event.
* If argument is omitted, this method defines the callback of all events. * If argument is omitted, this method defines the callback of all events.
*/ */
static VALUE static VALUE
@ -5388,9 +5509,10 @@ fev_on_event(argc, argv, self)
} }
/* /*
* call-seq:
* WIN32OLE_EVENT#on_event_with_outargs([event]){...} * WIN32OLE_EVENT#on_event_with_outargs([event]){...}
* ---- *
* defines the callback of event. * Defines the callback of event.
* If you want modify argument in callback, * If you want modify argument in callback,
* you should use this method instead of WIN32OLE_EVENT#on_event. * you should use this method instead of WIN32OLE_EVENT#on_event.
*/ */