当前位置: 首页>>代码示例>>C++>>正文


C++ CSTR2RVAL函数代码示例

本文整理汇总了C++中CSTR2RVAL函数的典型用法代码示例。如果您正苦于以下问题:C++ CSTR2RVAL函数的具体用法?C++ CSTR2RVAL怎么用?C++ CSTR2RVAL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了CSTR2RVAL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的CSTR2RVAL函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。