本文整理汇总了C++中CSTR2RVAL函数的典型用法代码示例。如果您正苦于以下问题:C++ CSTR2RVAL函数的具体用法?C++ CSTR2RVAL怎么用?C++ CSTR2RVAL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CSTR2RVAL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: rbatk_document_get_locale
static VALUE
rbatk_document_get_locale(VALUE self)
{
return CSTR2RVAL(atk_document_get_locale(_SELF(self)));
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:5,代码来源:rbatkdocument.c
示例2: rg_accel_path
static VALUE
rg_accel_path(VALUE self)
{
const gchar *quark_str = g_quark_to_string(_SELF(self)->accel_path_quark);
return quark_str ? CSTR2RVAL(quark_str) : Qnil;
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:6,代码来源:rbgtk-accel-group-entry.c
示例3: translate_func
static gchar *
translate_func(const gchar *path, gpointer func)
{
VALUE ret = rb_funcall((VALUE)func, id_call, 1, CSTR2RVAL(path));
return (gchar *)RVAL2CSTR(ret);
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:6,代码来源:rbgtkactiongroup.c
示例4: device_name
/* Accessor */
static VALUE
device_name(VALUE self)
{
return CSTR2RVAL(_SELF(self)->name);
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:6,代码来源:rbgdkdevice.c
示例5: ifact_s_path_from_widget
static VALUE
ifact_s_path_from_widget(VALUE self, VALUE widget)
{
return CSTR2RVAL(gtk_item_factory_path_from_widget(RVAL2WIDGET(widget)));
}
开发者ID:benolee,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkitemfactory.c
示例6: rg_output_bin
static VALUE
rg_output_bin(VALUE self)
{
return CSTR2RVAL(gtk_print_settings_get_output_bin(_SELF(self)));
}
开发者ID:msakai,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkprintsettings.c
示例7: ps_get
static VALUE
ps_get(VALUE self, VALUE key)
{
return CSTR2RVAL(gtk_print_settings_get(_SELF(self), RVAL2CSTR(key)));
}
开发者ID:msakai,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkprintsettings.c
示例8: rg_description
static VALUE
rg_description(VALUE self)
{
return CSTR2RVAL(gtk_recent_info_get_description(_SELF(self)));
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkrecentinfo.c
示例9: rg_mime_type
static VALUE
rg_mime_type(VALUE self)
{
return CSTR2RVAL(gtk_recent_info_get_mime_type(_SELF(self)));
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkrecentinfo.c
示例10: rg_short_name
static VALUE
rg_short_name(VALUE self)
{
return CSTR2RVAL(gtk_recent_info_get_short_name(_SELF(self)));
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkrecentinfo.c
示例11: rg_uri
static VALUE
rg_uri(VALUE self)
{
return CSTR2RVAL(gtk_recent_info_get_uri(_SELF(self)));
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkrecentinfo.c
示例12: rg_last_application
static VALUE
rg_last_application(VALUE self)
{
return CSTR2RVAL(gtk_recent_info_last_application(_SELF(self)));
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkrecentinfo.c
示例13: rb_gi_argument_to_ruby
VALUE
rb_gi_argument_to_ruby(GIArgument *argument, GITypeInfo *type_info)
{
VALUE rb_argument = Qnil;
GITypeTag type_tag;
type_tag = g_type_info_get_tag(type_info);
switch (type_tag) {
case GI_TYPE_TAG_VOID:
rb_argument = Qnil;
break;
case GI_TYPE_TAG_BOOLEAN:
rb_argument = CBOOL2RVAL(argument->v_boolean);
break;
case GI_TYPE_TAG_INT8:
rb_argument = INT2NUM(argument->v_int8);
break;
case GI_TYPE_TAG_UINT8:
rb_argument = UINT2NUM(argument->v_uint8);
break;
case GI_TYPE_TAG_INT16:
rb_argument = INT2NUM(argument->v_int16);
break;
case GI_TYPE_TAG_UINT16:
rb_argument = UINT2NUM(argument->v_uint16);
break;
case GI_TYPE_TAG_INT32:
rb_argument = INT2NUM(argument->v_int32);
break;
case GI_TYPE_TAG_UINT32:
rb_argument = UINT2NUM(argument->v_uint32);
break;
case GI_TYPE_TAG_INT64:
rb_argument = LONG2NUM(argument->v_int64);
break;
case GI_TYPE_TAG_UINT64:
rb_argument = ULONG2NUM(argument->v_uint64);
break;
case GI_TYPE_TAG_FLOAT:
rb_argument = DBL2NUM(argument->v_float);
break;
case GI_TYPE_TAG_DOUBLE:
rb_argument = DBL2NUM(argument->v_double);
break;
case GI_TYPE_TAG_GTYPE:
rb_argument = rbgobj_gtype_new(argument->v_size);
break;
case GI_TYPE_TAG_UTF8:
rb_argument = CSTR2RVAL(argument->v_string);
break;
case GI_TYPE_TAG_FILENAME:
/* TODO: set encoding */
rb_argument = CSTR2RVAL(argument->v_string);
break;
case GI_TYPE_TAG_ARRAY:
rb_argument = array_to_ruby(argument->v_pointer, type_info);
break;
case GI_TYPE_TAG_INTERFACE:
rb_argument = interface_to_ruby(argument, type_info);
break;
case GI_TYPE_TAG_GLIST:
case GI_TYPE_TAG_GSLIST:
case GI_TYPE_TAG_GHASH:
rb_raise(rb_eNotImpError, "TODO: GIArgument(unichar) -> Ruby");
break;
case GI_TYPE_TAG_ERROR:
rb_argument = GERROR2RVAL(argument->v_pointer);
break;
case GI_TYPE_TAG_UNICHAR:
rb_raise(rb_eNotImpError,
"TODO: GIArgument(%s) -> Ruby",
g_type_tag_to_string(type_tag));
break;
default:
g_assert_not_reached();
break;
}
return rb_argument;
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:80,代码来源:rb-gi-argument.c
示例14: rg_composite_name
static VALUE
rg_composite_name(VALUE self)
{
return CSTR2RVAL(gtk_widget_get_composite_name(_SELF(self)));
}
开发者ID:adamhooper,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkwidget.c
示例15: rg_dither
static VALUE
rg_dither(VALUE self)
{
return CSTR2RVAL(gtk_print_settings_get_dither(_SELF(self)));
}
开发者ID:msakai,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkprintsettings.c
示例16: rg_filename
static VALUE
rg_filename(VALUE self)
{
return CSTR2RVAL(gtk_icon_info_get_filename(_SELF(self)));
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkiconinfo.c
示例17: rg_finishings
static VALUE
rg_finishings(VALUE self)
{
return CSTR2RVAL(gtk_print_settings_get_finishings(_SELF(self)));
}
开发者ID:msakai,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkprintsettings.c
示例18: rg_display_name
static VALUE
rg_display_name(VALUE self)
{
return CSTR2RVAL(gtk_icon_info_get_display_name(_SELF(self)));
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkiconinfo.c
示例19: Init_gtk_print_settings
void
Init_gtk_print_settings(void)
{
#if GTK_CHECK_VERSION(2,10,0)
VALUE RG_TARGET_NAMESPACE;
s_string = ID2SYM(rb_intern("string"));
s_bool = ID2SYM(rb_intern("bool"));
s_double = ID2SYM(rb_intern("double"));
s_length = ID2SYM(rb_intern("length"));
s_int = ID2SYM(rb_intern("int"));
RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_PRINT_SETTINGS,
"PrintSettings", mGtk);
rb_include_module(RG_TARGET_NAMESPACE, rb_mEnumerable);
#if GTK_CHECK_VERSION(2,12,0)
RG_DEF_METHOD(initialize, -1);
#else
RG_DEF_METHOD(initialize, 0);
#endif
RG_DEF_METHOD(dup, 0);
RG_DEF_METHOD_P(has_key, 1);
RG_DEF_METHOD(get, -1);
RG_DEF_ALIAS("[]", "get");
RG_DEF_METHOD(get_bool, 1);
RG_DEF_METHOD(get_double, -1);
RG_DEF_METHOD(get_length, 2);
RG_DEF_METHOD(get_int, -1);
RG_DEF_METHOD(set, -1);
RG_DEF_METHOD_OPERATOR("[]=", ps_set_generic_indexer, -1);
RG_DEF_METHOD(unset, -1);
RG_DEF_ALIAS("delete", "unset");
RG_DEF_METHOD(each, 0);
rb_define_const(RG_TARGET_NAMESPACE, "PRINTER",
CSTR2RVAL(GTK_PRINT_SETTINGS_PRINTER));
rb_define_const(RG_TARGET_NAMESPACE, "ORIENTATION",
CSTR2RVAL(GTK_PRINT_SETTINGS_ORIENTATION));
rb_define_const(RG_TARGET_NAMESPACE, "PAPER_FORMAT",
CSTR2RVAL(GTK_PRINT_SETTINGS_PAPER_FORMAT));
rb_define_const(RG_TARGET_NAMESPACE, "PAPER_WIDTH",
CSTR2RVAL(GTK_PRINT_SETTINGS_PAPER_WIDTH));
rb_define_const(RG_TARGET_NAMESPACE, "PAPER_HEIGHT",
CSTR2RVAL(GTK_PRINT_SETTINGS_PAPER_HEIGHT));
rb_define_const(RG_TARGET_NAMESPACE, "N_COPIES",
CSTR2RVAL(GTK_PRINT_SETTINGS_N_COPIES));
rb_define_const(RG_TARGET_NAMESPACE, "DEFAULT_SOURCE",
CSTR2RVAL(GTK_PRINT_SETTINGS_DEFAULT_SOURCE));
rb_define_const(RG_TARGET_NAMESPACE, "QUALITY",
CSTR2RVAL(GTK_PRINT_SETTINGS_QUALITY));
rb_define_const(RG_TARGET_NAMESPACE, "RESOLUTION",
CSTR2RVAL(GTK_PRINT_SETTINGS_RESOLUTION));
rb_define_const(RG_TARGET_NAMESPACE, "USE_COLOR",
CSTR2RVAL(GTK_PRINT_SETTINGS_USE_COLOR));
rb_define_const(RG_TARGET_NAMESPACE, "DUPLEX",
CSTR2RVAL(GTK_PRINT_SETTINGS_DUPLEX));
rb_define_const(RG_TARGET_NAMESPACE, "COLLATE",
CSTR2RVAL(GTK_PRINT_SETTINGS_COLLATE));
rb_define_const(RG_TARGET_NAMESPACE, "REVERSE",
CSTR2RVAL(GTK_PRINT_SETTINGS_REVERSE));
rb_define_const(RG_TARGET_NAMESPACE, "MEDIA_TYPE",
CSTR2RVAL(GTK_PRINT_SETTINGS_MEDIA_TYPE));
rb_define_const(RG_TARGET_NAMESPACE, "DITHER",
CSTR2RVAL(GTK_PRINT_SETTINGS_DITHER));
rb_define_const(RG_TARGET_NAMESPACE, "SCALE",
CSTR2RVAL(GTK_PRINT_SETTINGS_SCALE));
rb_define_const(RG_TARGET_NAMESPACE, "PRINT_PAGES",
CSTR2RVAL(GTK_PRINT_SETTINGS_PRINT_PAGES));
rb_define_const(RG_TARGET_NAMESPACE, "PAGE_RANGES",
CSTR2RVAL(GTK_PRINT_SETTINGS_PAGE_RANGES));
rb_define_const(RG_TARGET_NAMESPACE, "PAGE_SET",
CSTR2RVAL(GTK_PRINT_SETTINGS_PAGE_SET));
rb_define_const(RG_TARGET_NAMESPACE, "FINISHINGS",
CSTR2RVAL(GTK_PRINT_SETTINGS_FINISHINGS));
rb_define_const(RG_TARGET_NAMESPACE, "NUMBER_UP",
CSTR2RVAL(GTK_PRINT_SETTINGS_NUMBER_UP));
rb_define_const(RG_TARGET_NAMESPACE, "OUTPUT_BIN",
CSTR2RVAL(GTK_PRINT_SETTINGS_OUTPUT_BIN));
rb_define_const(RG_TARGET_NAMESPACE, "OUTPUT_FILE_FORMAT",
CSTR2RVAL(GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT));
rb_define_const(RG_TARGET_NAMESPACE, "OUTPUT_URI",
CSTR2RVAL(GTK_PRINT_SETTINGS_OUTPUT_URI));
rb_define_const(RG_TARGET_NAMESPACE, "WIN32_DRIVER_VERSION",
CSTR2RVAL(GTK_PRINT_SETTINGS_WIN32_DRIVER_VERSION));
rb_define_const(RG_TARGET_NAMESPACE, "WIN32_DRIVER_EXTRA",
CSTR2RVAL(GTK_PRINT_SETTINGS_WIN32_DRIVER_EXTRA));
/* Helpers: */
RG_DEF_METHOD(printer, 0);
RG_DEF_METHOD(set_printer, 1);
RG_DEF_METHOD(orientation, 0);
RG_DEF_METHOD(set_orientation, 1);
//.........这里部分代码省略.........
开发者ID:msakai,项目名称:ruby-gnome2,代码行数:101,代码来源:rbgtkprintsettings.c
示例20: ps_s_get_default
static VALUE
ps_s_get_default(VALUE self)
{
return CSTR2RVAL(gtk_paper_size_get_default());
}
开发者ID:pkorenev,项目名称:ruby-gnome2,代码行数:5,代码来源:rbgtkpapersize.c
注:本文中的CSTR2RVAL函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论