本文整理汇总了C++中GENUM2RVAL函数的典型用法代码示例。如果您正苦于以下问题:C++ GENUM2RVAL函数的具体用法?C++ GENUM2RVAL怎么用?C++ GENUM2RVAL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GENUM2RVAL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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));
}
示例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;
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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));
}