ext/win32ole/win32ole_variable.c in win32ole-1.8.10 vs ext/win32ole/win32ole_variable.c in win32ole-1.9.0

- old
+ new

@@ -41,13 +41,13 @@ { return ptr ? sizeof(struct olevariabledata) : 0; } /* - * Document-class: WIN32OLE_VARIABLE + * Document-class: WIN32OLE::Variable * - * <code>WIN32OLE_VARIABLE</code> objects represent OLE variable information. + * +WIN32OLE::Variable+ objects represent OLE variable information. */ VALUE create_win32ole_variable(ITypeInfo *pTypeInfo, UINT index, VALUE name) { @@ -61,15 +61,15 @@ return obj; } /* * call-seq: - * WIN32OLE_VARIABLE#name + * name * * Returns the name of variable. * - * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') + * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') * variables = tobj.variables * variables.each do |variable| * puts "#{variable.name}" * end * @@ -101,15 +101,15 @@ return type; } /* * call-seq: - * WIN32OLE_VARIABLE#ole_type + * ole_type * * Returns OLE type string. * - * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') + * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') * variables = tobj.variables * variables.each do |variable| * puts "#{variable.ole_type} #{variable.name}" * end * @@ -143,15 +143,15 @@ return type; } /* * call-seq: - * WIN32OLE_VARIABLE#ole_type_detail + * ole_type_detail * * Returns detail information of type. The information is array of type. * - * tobj = WIN32OLE_TYPE.new('DirectX 7 for Visual Basic Type Library', 'D3DCLIPSTATUS') + * tobj = WIN32OLE::Type.new('DirectX 7 for Visual Basic Type Library', 'D3DCLIPSTATUS') * variable = tobj.variables.find {|variable| variable.name == 'lFlags'} * tdetail = variable.ole_type_detail * p tdetail # => ["USERDEFINED", "CONST_D3DCLIPSTATUSFLAGS"] * */ @@ -178,16 +178,16 @@ return val; } /* * call-seq: - * WIN32OLE_VARIABLE#value + * value * * Returns value if value is exists. If the value does not exist, * this method returns nil. * - * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') + * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') * variables = tobj.variables * variables.each do |variable| * puts "#{variable.name} #{variable.value}" * end * @@ -225,15 +225,15 @@ return visible; } /* * call-seq: - * WIN32OLE_VARIABLE#visible? + * visible? * * Returns true if the variable is public. * - * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') + * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') * variables = tobj.variables * variables.each do |variable| * puts "#{variable.name} #{variable.visible?}" * end * @@ -282,15 +282,15 @@ return kind; } /* * call-seq: - * WIN32OLE_VARIABLE#variable_kind + * variable_kind * * Returns variable kind string. * - * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') + * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') * variables = tobj.variables * variables.each do |variable| * puts "#{variable.name} #{variable.variable_kind}" * end * @@ -323,14 +323,14 @@ return kind; } /* * call-seq: - * WIN32OLE_VARIABLE#varkind + * varkind * * Returns the number which represents variable kind. - * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') + * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') * variables = tobj.variables * variables.each do |variable| * puts "#{variable.name} #{variable.varkind}" * end * @@ -349,28 +349,29 @@ return ole_variable_varkind(pvar->pTypeInfo, pvar->index); } /* * call-seq: - * WIN32OLE_VARIABLE#inspect -> String + * inspect -> String * * Returns the OLE variable name and the value with class name. * */ static VALUE folevariable_inspect(VALUE self) { VALUE v = rb_inspect(folevariable_value(self)); VALUE n = folevariable_name(self); VALUE detail = rb_sprintf("%"PRIsVALUE"=%"PRIsVALUE, n, v); - return make_inspect("WIN32OLE_VARIABLE", detail); + return make_inspect("WIN32OLE::Variable", detail); } VALUE cWIN32OLE_VARIABLE; void Init_win32ole_variable(void) { cWIN32OLE_VARIABLE = rb_define_class_under(cWIN32OLE, "Variable", rb_cObject); + /* Alias of WIN32OLE::Variable, for the backward compatibility */ rb_define_const(rb_cObject, "WIN32OLE_VARIABLE", cWIN32OLE_VARIABLE); rb_undef_alloc_func(cWIN32OLE_VARIABLE); rb_define_method(cWIN32OLE_VARIABLE, "name", folevariable_name, 0); rb_define_method(cWIN32OLE_VARIABLE, "ole_type", folevariable_ole_type, 0); rb_define_method(cWIN32OLE_VARIABLE, "ole_type_detail", folevariable_ole_type_detail, 0);