• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GENUM2RVAL函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了GENUM2RVAL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: rg_line_attributes

static VALUE
rg_line_attributes(VALUE self)
{
    GdkGCValues val;
    gdk_gc_get_values(_SELF(self), &val);

    return rb_ary_new3(4, INT2NUM(val.line_width),
                       GENUM2RVAL(val.line_style, GDK_TYPE_LINE_STYLE),
                       GENUM2RVAL(val.cap_style, GDK_TYPE_CAP_STYLE),
                       GENUM2RVAL(val.join_style, GDK_TYPE_JOIN_STYLE));
}
开发者ID:tec,项目名称:ruby-gnome2,代码行数:11,代码来源:rbgdkgc.c


示例2: rbclt_box_layout_get_alignment

static VALUE
rbclt_box_layout_get_alignment (VALUE self, VALUE actor)
{
    ClutterBoxLayout *layout = CLUTTER_BOX_LAYOUT (RVAL2GOBJ (self));
    ClutterActor *g_actor = CLUTTER_ACTOR (RVAL2GOBJ (actor));

    ClutterBoxAlignment x_align, y_align;
    VALUE answer = rb_hash_new ();

    clutter_box_layout_get_alignment (layout, g_actor, &x_align, &y_align);
    rb_hash_aset (answer, rb_intern ("x"), GENUM2RVAL (x_align, CLUTTER_TYPE_BOX_ALIGNMENT));
    rb_hash_aset (answer, rb_intern ("y"), GENUM2RVAL (y_align, CLUTTER_TYPE_BOX_ALIGNMENT));
    return answer;
}
开发者ID:orospakr,项目名称:rbclutter,代码行数:14,代码来源:rbcltboxlayout.c


示例3: rg_find_window

static VALUE
rg_find_window(int argc, VALUE *argv, VALUE self)
{
    VALUE drag_window, x_root, y_root;
    GdkWindow *dest_window;
    GdkDragProtocol prot;

    if (argc == 3) {
        rb_scan_args(argc, argv, "30", &drag_window, &x_root, &y_root);
        gdk_drag_find_window(_SELF(self),
                             GDK_WINDOW(RVAL2GOBJ(drag_window)), 
                             NUM2INT(x_root), NUM2INT(y_root),
                             &dest_window, &prot);
    } else {
        VALUE screen;
        rb_scan_args(argc, argv, "40", &drag_window, &screen, &x_root, &y_root);
        gdk_drag_find_window_for_screen(_SELF(self),
                                        GDK_WINDOW(RVAL2GOBJ(drag_window)), 
                                        GDK_SCREEN(RVAL2GOBJ(screen)),
                                        NUM2INT(x_root), NUM2INT(y_root),
                                        &dest_window, &prot);
    }

    return rb_ary_new3(2, GOBJ2RVAL(dest_window), 
                       GENUM2RVAL(prot, GDK_TYPE_DRAG_PROTOCOL));
}
开发者ID:Vasfed,项目名称:ruby-gnome2,代码行数:26,代码来源:rbgdkdragcontext.c


示例4: rbclt_flow_layout_get_orientation

static VALUE
rbclt_flow_layout_get_orientation (VALUE self)
{
  ClutterFlowLayout *flow_layout = CLUTTER_FLOW_LAYOUT (RVAL2GOBJ (self));
  
  return GENUM2RVAL (clutter_flow_layout_get_orientation (flow_layout), CLUTTER_TYPE_FLOW_ORIENTATION);
}
开发者ID:orospakr,项目名称:rbclutter,代码行数:7,代码来源:rbcltflowlayout.c


示例5: rg_entry_type

/* Method: entry_type
 * Returns: the type of the entry (see Gst::IndexEntry::Types).
 */
static VALUE
rg_entry_type (VALUE self)
{
    GstIndexEntry *entry = RGST_INDEX_ENTRY (self);

    return GENUM2RVAL (entry->type, GST_TYPE_INDEX_ENTRY_TYPE);
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:10,代码来源:rbgstindexentry.c


示例6: gdk_s_keyboard_grab

static VALUE
gdk_s_keyboard_grab(VALUE self, VALUE win, VALUE owner_events, VALUE time)
{
    return GENUM2RVAL(gdk_keyboard_grab(GDK_WINDOW(RVAL2GOBJ(win)),
                                        RVAL2CBOOL(owner_events), NUM2INT(time)),
                      GDK_TYPE_GRAB_STATUS);
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:7,代码来源:rbgdk.c


示例7: rpango_find_base_dir

static VALUE
rpango_find_base_dir(VALUE self, VALUE text)
{
    StringValue(text);
    return GENUM2RVAL(pango_find_base_dir(RSTRING_PTR(text), RSTRING_LEN(text)), 
                      PANGO_TYPE_DIRECTION);
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:7,代码来源:rbpangomain.c


示例8: term_get_cursor_shape

static VALUE
term_get_cursor_shape(VALUE self)
{
    VteTerminalCursorShape shape;

    shape = vte_terminal_get_cursor_shape(RVAL2TERM(self));
    return GENUM2RVAL(shape, VTE_TYPE_TERMINAL_CURSOR_SHAPE);
}
开发者ID:benolee,项目名称:ruby-gnome2,代码行数:8,代码来源:rbvte-terminal.c


示例9: term_get_cursor_blink_mode

static VALUE
term_get_cursor_blink_mode(VALUE self)
{
    VteTerminalCursorBlinkMode mode;

    mode = vte_terminal_get_cursor_blink_mode(RVAL2TERM(self));
    return GENUM2RVAL(mode, VTE_TYPE_TERMINAL_CURSOR_BLINK_MODE);
}
开发者ID:benolee,项目名称:ruby-gnome2,代码行数:8,代码来源:rbvte-terminal.c


示例10: rg_subwindow_mode

static VALUE
rg_subwindow_mode(VALUE self)
{
    GdkGCValues val;
    gdk_gc_get_values(_SELF(self), &val);

    return GENUM2RVAL(val.subwindow_mode, GDK_TYPE_SUBWINDOW_MODE);
}
开发者ID:tec,项目名称:ruby-gnome2,代码行数:8,代码来源:rbgdkgc.c


示例11: rg_fill

static VALUE
rg_fill(VALUE self)
{
    GdkGCValues val;
    gdk_gc_get_values(_SELF(self), &val);

    return GENUM2RVAL(val.fill, GDK_TYPE_FILL);
}
开发者ID:tec,项目名称:ruby-gnome2,代码行数:8,代码来源:rbgdkgc.c


示例12: rg_function

static VALUE
rg_function(VALUE self)
{
    GdkGCValues val;
    gdk_gc_get_values(_SELF(self), &val);

    return GENUM2RVAL(val.function, GDK_TYPE_FUNCTION);
}
开发者ID:tec,项目名称:ruby-gnome2,代码行数:8,代码来源:rbgdkgc.c


示例13: rg_rect_in

static VALUE
rg_rect_in(VALUE self, VALUE rect)
{
    return GENUM2RVAL(gdk_region_rect_in(
                          _SELF(self),
                          (GdkRectangle*)RVAL2BOXED(rect, GDK_TYPE_RECTANGLE)),
                      GDK_TYPE_OVERLAP_TYPE);
}
开发者ID:msakai,项目名称:ruby-gnome2,代码行数:8,代码来源:rbgdkregion.c


示例14: iview_drag_dest_item

static VALUE
iview_drag_dest_item(VALUE self)
{
    GtkTreePath* path;
    GtkIconViewDropPosition pos;
    gtk_icon_view_get_drag_dest_item(_SELF(self), &path, &pos);
    return rb_assoc_new(GTKTREEPATH2RVAL(path),
                        GENUM2RVAL(pos, GTK_TYPE_ICON_VIEW_DROP_POSITION));
}
开发者ID:benolee,项目名称:ruby-gnome2,代码行数:9,代码来源:rbgtkiconview.c


示例15: rg_drag_dest_row

static VALUE
rg_drag_dest_row(VALUE self)
{
    GtkTreePath* path = NULL;
    GtkTreeViewDropPosition pos;
    gtk_tree_view_get_drag_dest_row(_SELF(self), &path, &pos);
    return rb_ary_new3(2, path ? GTKTREEPATH2RVAL(path) : Qnil, 
                       GENUM2RVAL(pos, GTK_TYPE_TREE_VIEW_DROP_POSITION));
}
开发者ID:Vasfed,项目名称:ruby-gnome2,代码行数:9,代码来源:rbgtktreeview.c


示例16: iview_get_dest_item_at_pos

static VALUE
iview_get_dest_item_at_pos(VALUE self, VALUE drag_x, VALUE drag_y)
{
    GtkTreePath* path;
    GtkIconViewDropPosition pos;
    gboolean item_at_pos = gtk_icon_view_get_dest_item_at_pos(_SELF(self), NUM2INT(drag_x), NUM2INT(drag_y), &path, &pos);
    return item_at_pos ? rb_assoc_new(GTKTREEPATH2RVAL(path),
                                      GENUM2RVAL(pos, GTK_TYPE_ICON_VIEW_DROP_POSITION)) : Qnil;
}
开发者ID:benolee,项目名称:ruby-gnome2,代码行数:9,代码来源:rbgtkiconview.c


示例17: gdk_s_pointer_grab

static VALUE
gdk_s_pointer_grab(VALUE self, VALUE win, VALUE owner_events, VALUE event_mask, VALUE confine_to, VALUE cursor, VALUE time)
{
    return GENUM2RVAL(gdk_pointer_grab(GDK_WINDOW(RVAL2GOBJ(win)),
                                       RVAL2CBOOL(owner_events),
                                       RVAL2GFLAGS(event_mask, GDK_TYPE_EVENT_MASK),
                                       NIL_P(confine_to)?NULL:GDK_WINDOW(RVAL2GOBJ(confine_to)),
                                       NIL_P(cursor)?NULL:(GdkCursor*)RVAL2BOXED(cursor, GDK_TYPE_CURSOR),
                                       NUM2INT(time)), GDK_TYPE_GRAB_STATUS);
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:10,代码来源:rbgdk.c


示例18: rg_pointer_grab

static VALUE
rg_pointer_grab(VALUE self, VALUE item, VALUE event_mask, VALUE cursor, VALUE etime)
{
    return GENUM2RVAL(
        goo_canvas_pointer_grab(SELF(self), RVAL2GOOCANVASITEM(item),
                                NUM2INT(event_mask),
                                (GdkCursor *)RVAL2BOXED(cursor, GDK_TYPE_CURSOR),
                                NIL_P(etime) ? 0 : NUM2UINT(etime)),
        GDK_TYPE_GRAB_STATUS);
}
开发者ID:masaakiaoyagi,项目名称:ruby-gnome2,代码行数:10,代码来源:rbgoocanvas.c


示例19: device_axes

static VALUE
device_axes(VALUE self)
{
    gint i;
    VALUE ary = rb_ary_new();
    GdkDeviceAxis* axes = _SELF(self)->axes;

    for (i = 0; i < _SELF(self)->num_axes; i++){
        rb_ary_push(ary, rb_ary_new3(3, GENUM2RVAL(axes[i].use, GDK_TYPE_AXIS_USE), 
                                     rb_float_new(axes[i].min), rb_float_new(axes[i].max)));
    }
    return ary;
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:13,代码来源:rbgdkdevice.c


示例20: rg_get_dest_row_at_pos

static VALUE
rg_get_dest_row_at_pos(VALUE self, VALUE drag_x, VALUE drag_y)
{
    GtkTreePath* path;
    GtkTreeViewDropPosition pos;
    gboolean ret;

    ret = gtk_tree_view_get_dest_row_at_pos(_SELF(self), 
                                            NUM2INT(drag_x), NUM2INT(drag_y),
                                            &path, &pos);
    return ret ? rb_ary_new3(2, path ? GTKTREEPATH2RVAL(path) : Qnil, 
                             GENUM2RVAL(pos, GTK_TYPE_TREE_VIEW_DROP_POSITION)) : Qnil;
}
开发者ID:Vasfed,项目名称:ruby-gnome2,代码行数:13,代码来源:rbgtktreeview.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GEN_CMD_CODE函数代码示例发布时间:2022-05-30
下一篇:
C++ GENMASK函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap