本文整理汇总了C++中G_DEF_SETTERS函数的典型用法代码示例。如果您正苦于以下问题:C++ G_DEF_SETTERS函数的具体用法?C++ G_DEF_SETTERS怎么用?C++ G_DEF_SETTERS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了G_DEF_SETTERS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Init_gtk_recent_filter
void
Init_gtk_recent_filter()
{
#if GTK_CHECK_VERSION(2,10,0)
VALUE rf = G_DEF_CLASS(GTK_TYPE_RECENT_FILTER, "RecentFilter", mGtk);
rb_define_method(rf, "initialize", rf_initialize, 0);
rb_define_method(rf, "name", rf_get_name, 0);
rb_define_method(rf, "set_name", rf_set_name, 1);
rb_define_method(rf, "add_mime_type", rf_add_mime_type, 1);
rb_define_method(rf, "add_pattern", rf_add_pattern, 1);
rb_define_method(rf, "add_pixbuf_formats", rf_add_pixbuf_formats, 0);
rb_define_method(rf, "add_application", rf_add_application, 1);
rb_define_method(rf, "add_group", rf_add_group, 1);
rb_define_method(rf, "add_age", rf_add_age, 1);
rb_define_method(rf, "add_custom", rf_add_custom, 1);
rb_define_method(rf, "needed", rf_get_needed, 0);
rb_define_method(rf, "filter", rf_filter_filter, 1);
G_DEF_SETTERS(rf);
/* GtkRecentFilterFlags */
G_DEF_CLASS(GTK_TYPE_RECENT_FILTER_FLAGS, "Flags", rf);
G_DEF_CONSTANTS(rf, GTK_TYPE_RECENT_FILTER_FLAGS, "GTK_RECENT_FILTER_");
#endif
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:25,代码来源:rbgtkrecentfilter.c
示例2: Init_gtk_table
void
Init_gtk_table()
{
VALUE gTable = G_DEF_CLASS(GTK_TYPE_TABLE, "Table", mGtk);
/* Undef properties, column/row-spacing confuse us ... */
rb_undef_method(gTable, "set_row_spacing");
rb_undef_method(gTable, "set_column_spacing");
rb_undef_method(gTable, "row_spacing=");
rb_undef_method(gTable, "column_spacing=");
rb_undef_method(gTable, "row_spacing");
rb_undef_method(gTable, "column_spacing");
rb_define_method(gTable, "initialize", tbl_initialize, -1);
rb_define_method(gTable, "resize", tbl_resize, 2);
rb_define_method(gTable, "attach", tbl_attach, -1);
rb_define_method(gTable, "attach_defaults", tbl_attach_defaults, 5);
rb_define_method(gTable, "set_row_spacing", tbl_set_row_spacing, 2);
rb_define_method(gTable, "set_column_spacing", tbl_set_col_spacing, 2);
rb_define_method(gTable, "get_row_spacing", tbl_get_row_spacing, 1);
rb_define_method(gTable, "get_column_spacing", tbl_get_col_spacing, 1);
rb_define_method(gTable, "set_row_spacings", tbl_set_row_spacings, 1);
rb_define_method(gTable, "set_column_spacings", tbl_set_col_spacings, 1);
rb_define_method(gTable, "row_spacings", tbl_get_row_spacings, 0);
rb_define_method(gTable, "column_spacings", tbl_get_col_spacings, 0);
rb_define_method(gTable, "default_row_spacing", tbl_get_default_row_spacing, 0);
rb_define_method(gTable, "default_column_spacing", tbl_get_default_col_spacing, 0);
G_DEF_SETTERS(gTable);
}
开发者ID:benolee,项目名称:ruby-gnome2,代码行数:31,代码来源:rbgtktable.c
示例3: Init_gtk_rc
void
Init_gtk_rc(VALUE mGtk)
{
VALUE RG_TARGET_NAMESPACE = rb_define_module_under(mGtk, "RC");
RG_DEF_MODFUNC(get_style, 1);
RG_DEF_MODFUNC(get_style_by_paths, -1);
RG_DEF_MODFUNC(parse, 1);
RG_DEF_MODFUNC(parse_string, 1);
RG_DEF_MODFUNC(reparse_all, 0);
RG_DEF_MODFUNC(reparse_all_for_settings, 2);
RG_DEF_MODFUNC(reset_styles, 1);
RG_DEF_MODFUNC(add_default_file, 1);
RG_DEF_MODFUNC(default_files, 0);
RG_DEF_MODFUNC(set_default_files, 1);
RG_DEF_MODFUNC(find_module_in_path, 1);
RG_DEF_MODFUNC(module_dir, 0);
RG_DEF_MODFUNC(im_module_path, 0);
RG_DEF_MODFUNC(im_module_file, 0);
RG_DEF_MODFUNC(theme_dir, 0);
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
/* GtkRcFlags */
G_DEF_CLASS(GTK_TYPE_RC_FLAGS, "Flags", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_RC_FLAGS, "GTK_RC_");
/* GtkRcTokenType */
G_DEF_CLASS(GTK_TYPE_RC_TOKEN_TYPE, "TokenType", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_RC_TOKEN_TYPE, "GTK_RC_");
}
开发者ID:Vasfed,项目名称:ruby-gnome2,代码行数:31,代码来源:rbgtkrc.c
示例4: Init_gtk_treemodel
void
Init_gtk_treemodel(VALUE mGtk)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(GTK_TYPE_TREE_MODEL, "TreeModel", mGtk);
RG_DEF_METHOD(flags, 0);
RG_DEF_METHOD(n_columns, 0);
RG_DEF_METHOD(get_column_type, 1);
RG_DEF_METHOD(iter_first, 0);
RG_DEF_METHOD(get_iter, 1);
RG_DEF_METHOD(get_value, 2);
RG_DEF_METHOD(each, 0);
RG_DEF_METHOD(row_changed, 2);
RG_DEF_METHOD(row_inserted, 2);
RG_DEF_METHOD(row_has_child_toggled, 2);
RG_DEF_METHOD(row_deleted, 1);
RG_DEF_METHOD(rows_reordered, 3);
RG_DEF_METHOD_P(iter_is_valid, 1);
/* GtkTreeModelFlags */
G_DEF_CLASS(GTK_TYPE_TREE_MODEL_FLAGS, "Flags", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_TREE_MODEL_FLAGS, "GTK_TREE_MODEL_");
G_DEF_SIGNAL_FUNC(RG_TARGET_NAMESPACE, "row_changed", (GValToRValSignalFunc)signal_func);
G_DEF_SIGNAL_FUNC(RG_TARGET_NAMESPACE, "row_inserted", (GValToRValSignalFunc)signal_func);
G_DEF_SIGNAL_FUNC(RG_TARGET_NAMESPACE, "row_has_child_toggled", (GValToRValSignalFunc)signal_func);
G_DEF_SIGNAL_FUNC(RG_TARGET_NAMESPACE, "rows_reordered", (GValToRValSignalFunc)signal_rows_reordered_func);
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
}
开发者ID:masaakiaoyagi,项目名称:ruby-gnome2,代码行数:30,代码来源:rbgtktreemodel.c
示例5: Init_gtk_sourceview
void
Init_gtk_sourceview (VALUE mGtk)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GTK_TYPE_SOURCE_VIEW, "SourceView", mGtk);
rb_define_const(RG_TARGET_NAMESPACE, "BUILD_VERSION",
rb_ary_new3(3,
INT2FIX(GTKSOURCEVIEW2_MAJOR_VERSION),
INT2FIX(GTKSOURCEVIEW2_MINOR_VERSION),
INT2FIX(GTKSOURCEVIEW2_MICRO_VERSION)));
RG_DEF_METHOD(initialize, -1);
#ifdef HAVE_GTK_SOURCE_MARK_GET_TYPE
RG_DEF_METHOD(get_mark_category_pixbuf, 1);
RG_DEF_METHOD(set_mark_category_pixbuf, 2);
RG_DEF_METHOD(get_mark_category_priority, 1);
RG_DEF_METHOD(set_mark_category_priority, 2);
#endif
#ifdef HAVE_GTK_SOURCE_VIEW_GET_MARK_CATEGORY_BACKGROUND
RG_DEF_METHOD(get_mark_category_background, 1);
RG_DEF_METHOD(set_mark_category_background, 2);
#endif
G_DEF_SETTERS (RG_TARGET_NAMESPACE);
G_DEF_CLASS(GTK_TYPE_SOURCE_SMART_HOME_END_TYPE, "SmartHomeEndType", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_SOURCE_SMART_HOME_END_TYPE, "GTK_SOURCE_");
#ifdef HAVE_GTK_SOURCE_VIEW_GET_MARK_CATEGORY_BACKGROUND
G_DEF_CLASS(GTK_TYPE_SOURCE_DRAW_SPACES_FLAGS, "DrawSpacesFlags", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_SOURCE_DRAW_SPACES_FLAGS, "GTK_SOURCE_");
#endif
}
开发者ID:adamhooper,项目名称:ruby-gnome2,代码行数:31,代码来源:rbgtksourceview.c
示例6: Init_gtk_recent_info
void
Init_gtk_recent_info(VALUE mGtk)
{
#if GTK_CHECK_VERSION(2,10,0)
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_RECENT_INFO, "RecentInfo", mGtk);
RG_DEF_METHOD(uri, 0);
RG_DEF_METHOD(display_name, 0);
RG_DEF_METHOD(description, 0);
RG_DEF_METHOD(mime_type, 0);
RG_DEF_METHOD(added, 0);
RG_DEF_METHOD(modified, 0);
RG_DEF_METHOD(visited, 0);
RG_DEF_METHOD_P(private_hint, 0);
RG_DEF_METHOD(application_info, 1);
RG_DEF_METHOD(applications, 0);
RG_DEF_METHOD(last_application, 0);
RG_DEF_METHOD(groups, 0);
RG_DEF_METHOD_P(has_group, 1);
RG_DEF_METHOD_P(has_application, 1);
RG_DEF_METHOD(get_icon, 1);
RG_DEF_METHOD(short_name, 0);
RG_DEF_METHOD(uri_display, 0);
RG_DEF_METHOD(age, 0);
RG_DEF_METHOD_P(local, 0);
RG_DEF_METHOD_P(exist, 0);
RG_DEF_METHOD_OPERATOR("==", ri_match, 1);
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
#endif
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:30,代码来源:rbgtkrecentinfo.c
示例7: Init_gtk_print_context
void
Init_gtk_print_context(VALUE mGtk)
{
#if GTK_CHECK_VERSION(2,10,0)
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_PRINT_CONTEXT,
"PrintContext", mGtk);
/* Rendering */
# ifdef HAVE_RB_CAIRO_H
RG_DEF_METHOD(cairo_context, 0);
# endif
RG_DEF_METHOD(page_setup, 0);
RG_DEF_METHOD(width, 0);
RG_DEF_METHOD(height, 0);
RG_DEF_METHOD(dpi_x, 0);
RG_DEF_METHOD(dpi_y, 0);
/* Fonts */
RG_DEF_METHOD(pango_fontmap, 0);
RG_DEF_METHOD(create_pango_context, 0);
RG_DEF_METHOD(create_pango_layout, 0);
/* Needed for preview implementations */
# ifdef HAVE_RB_CAIRO_H
RG_DEF_METHOD(set_cairo_context, 3);
# endif
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
#endif
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:30,代码来源:rbgtkprintcontext.c
示例8: Init_gtk_file_filter
void
Init_gtk_file_filter()
{
#if GTK_CHECK_VERSION(2,4,0)
VALUE gFileFilter = G_DEF_CLASS(GTK_TYPE_FILE_FILTER, "FileFilter", mGtk);
rb_define_method(gFileFilter, "initialize", ffil_initialize, 0);
rb_define_method(gFileFilter, "set_name", ffil_set_name, 1);
rb_define_method(gFileFilter, "name", ffil_get_name, 0);
rb_define_method(gFileFilter, "add_mime_type", ffil_add_mime_type, 1);
rb_define_method(gFileFilter, "add_pattern", ffil_add_pattern, 1);
#if GTK_CHECK_VERSION(2,6,0)
rb_define_method(gFileFilter, "add_pixbuf_formats", ffil_add_pixbuf_formats, 0);
#endif
rb_define_method(gFileFilter, "add_custom", ffil_add_custom, 1);
rb_define_method(gFileFilter, "needed", ffil_get_needed, 0);
rb_define_method(gFileFilter, "filter?", ffil_filter, 5);
G_DEF_SETTERS(gFileFilter);
G_DEF_CLASS(GTK_TYPE_FILE_FILTER_FLAGS, "Flags", gFileFilter);
G_DEF_CONSTANTS(gFileFilter, GTK_TYPE_FILE_FILTER_FLAGS, "GTK_FILE_FILTER_");
#endif
}
开发者ID:geoffyoungs,项目名称:ruby-gnome2,代码行数:27,代码来源:rbgtkfilefilter.c
示例9: Init_gtk_recent_manager
void
Init_gtk_recent_manager()
{
#if GTK_CHECK_VERSION(2,10,0)
VALUE rm = G_DEF_CLASS(GTK_TYPE_RECENT_MANAGER, "RecentManager", mGtk);
rb_define_method(rm, "initialize", rm_initialize, 0);
rb_define_singleton_method(rm, "default", rm_s_get_default, 0);
rb_define_singleton_method(rm, "get_for_screen", rm_s_get_for_screen, 1);
rb_define_method(rm, "set_screen", rm_set_screen, 1);
rb_define_method(rm, "add_item", rm_add_item, -1);
rb_define_method(rm, "remove_item", rm_remove_item, 1);
rb_define_method(rm, "lookup_item", rm_lookup_item, 1);
rb_define_method(rm, "has_item?", rm_has_item, 1);
rb_define_method(rm, "move_item", rm_move_item, 2);
rb_define_method(rm, "items", rm_get_items, 0);
rb_define_method(rm, "purge_items", rm_purge_items, 0);
G_DEF_SETTERS(rm);
/* GtkRecentManagerError */
G_DEF_ERROR(GTK_RECENT_MANAGER_ERROR, "RecentManagerError", mGtk, rb_eRuntimeError,
GTK_TYPE_RECENT_MANAGER_ERROR);
#endif
}
开发者ID:benolee,项目名称:ruby-gnome2,代码行数:25,代码来源:rbgtkrecentmanager.c
示例10: Init_gtk_recent_data
void
Init_gtk_recent_data(VALUE mGtk)
{
#if GTK_CHECK_VERSION(2,10,0)
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_RECENT_DATA, "RecentData", mGtk);
RG_DEF_METHOD(initialize, 0);
rb_define_method(RG_TARGET_NAMESPACE, "display_name", rd_get_display_name, 0);
rb_define_method(RG_TARGET_NAMESPACE, "set_display_name", rd_set_display_name, 1);
rb_define_method(RG_TARGET_NAMESPACE, "description", rd_get_description, 0);
rb_define_method(RG_TARGET_NAMESPACE, "set_description", rd_set_description, 1);
rb_define_method(RG_TARGET_NAMESPACE, "mime_type", rd_get_mime_type, 0);
rb_define_method(RG_TARGET_NAMESPACE, "set_mime_type", rd_set_mime_type, 1);
rb_define_method(RG_TARGET_NAMESPACE, "app_name", rd_get_app_name, 0);
rb_define_method(RG_TARGET_NAMESPACE, "set_app_name", rd_set_app_name, 1);
rb_define_method(RG_TARGET_NAMESPACE, "app_exec", rd_get_app_exec, 0);
rb_define_method(RG_TARGET_NAMESPACE, "set_app_exec", rd_set_app_exec, 1);
RG_DEF_METHOD(groups, 0);
RG_DEF_METHOD(set_groups, 1);
RG_DEF_METHOD_P(private, 0);
RG_DEF_METHOD(set_private, 1);
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
#endif
}
开发者ID:masaakiaoyagi,项目名称:ruby-gnome2,代码行数:25,代码来源:rbgtkrecentdata.c
示例11: rbclt_stage_init
void
rbclt_stage_init ()
{
VALUE klass = G_DEF_CLASS (CLUTTER_TYPE_STAGE, "Stage", rbclt_c_clutter);
rb_define_singleton_method (klass, "get_default", rbclt_stage_get_default, 0);
rb_define_method (klass, "initialize", rbclt_stage_initialize, 0);
rb_define_method (klass, "fullscreen", rbclt_stage_fullscreen, 0);
rb_define_method (klass, "unfullscreen", rbclt_stage_unfullscreen, 0);
rb_define_method (klass, "show_cursor", rbclt_stage_show_cursor, 0);
rb_define_method (klass, "hide_cursor", rbclt_stage_hide_cursor, 0);
rb_define_method (klass, "get_actor_at_pos", rbclt_stage_get_actor_at_pos, 2);
rb_define_method (klass, "event", rbclt_stage_event, 1);
rb_define_method (klass, "set_perspective", rbclt_stage_set_perspective, -1);
rb_define_method (klass, "read_pixels", rbclt_stage_read_pixels, 4);
rb_define_method (klass, "fog", rbclt_stage_get_fog, 0);
rb_define_method (klass, "set_fog", rbclt_stage_set_fog, -1);
rb_define_method (klass, "fog=", rbclt_stage_fog_equals, 1);
rb_define_method (klass, "resolution", rbclt_stage_get_resolution, 0);
rb_define_method (klass, "set_key_focus", rbclt_stage_set_key_focus, 1);
rb_define_method (klass, "key_focus", rbclt_stage_get_key_focus, 0);
rb_define_method (klass, "ensure_current", rbclt_stage_ensure_current, 0);
rb_define_method (klass, "default?", rbclt_stage_is_default, 0);
G_DEF_SETTERS (klass);
}
开发者ID:orospakr,项目名称:rbclutter,代码行数:27,代码来源:rbcltstage.c
示例12: rbclt_script_init
void
rbclt_script_init ()
{
VALUE klass = G_DEF_CLASS (CLUTTER_TYPE_SCRIPT, "Script", rbclt_c_clutter);
rb_define_method (klass, "initialize", rbclt_script_initialize, 0);
rb_define_method (klass, "load_from_file", rbclt_script_load_from_file, 1);
rb_define_method (klass, "load_from_data", rbclt_script_load_from_data, 1);
rb_define_method (klass, "get_object", rbclt_script_get_object, -1);
rb_define_alias (klass, "get_objects", "get_object");
rb_define_alias (klass, "[]", "get_object");
rb_define_method (klass, "unmerge_objects", rbclt_script_unmerge_objects, 1);
rb_define_method (klass, "ensure_objects", rbclt_script_ensure_objects, 0);
rb_define_method (klass, "get_type_from_name",
rbclt_script_get_type_from_name, 1);
rb_define_method (klass, "add_search_paths",
rbclt_script_add_search_paths, -1);
rb_define_alias (klass, "add_search_path", "add_search_paths");
rb_define_method (klass, "lookup_filename", rbclt_script_lookup_filename, 1);
rb_define_method (klass, "connect_signals", rbclt_script_connect_signals, -1);
rb_define_singleton_method (rbclt_c_clutter, "get_script_id",
rbclt_script_get_script_id, 1);
G_DEF_ERROR (CLUTTER_SCRIPT_ERROR, "ScriptError", rbclt_c_clutter,
rb_eRuntimeError, CLUTTER_TYPE_SCRIPT_ERROR);
id_call = rb_intern ("call");
id_method = rb_intern ("method");
eNoSignalError = rb_const_get (rb_const_get (rb_cObject, rb_intern ("GLib")),
rb_intern ("NoSignalError"));
G_DEF_SETTERS (klass);
}
开发者ID:orospakr,项目名称:rbclutter,代码行数:34,代码来源:rbcltscript.c
示例13: Init_gtk_recent_filter
void
Init_gtk_recent_filter(VALUE mGtk)
{
#if GTK_CHECK_VERSION(2,10,0)
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_RECENT_FILTER, "RecentFilter", mGtk);
RG_DEF_METHOD(initialize, 0);
RG_DEF_METHOD(name, 0);
RG_DEF_METHOD(set_name, 1);
RG_DEF_METHOD(add_mime_type, 1);
RG_DEF_METHOD(add_pattern, 1);
RG_DEF_METHOD(add_pixbuf_formats, 0);
RG_DEF_METHOD(add_application, 1);
RG_DEF_METHOD(add_group, 1);
RG_DEF_METHOD(add_age, 1);
RG_DEF_METHOD(add_custom, 1);
RG_DEF_METHOD(needed, 0);
RG_DEF_METHOD(filter, 1);
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
/* GtkRecentFilterFlags */
G_DEF_CLASS(GTK_TYPE_RECENT_FILTER_FLAGS, "Flags", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_RECENT_FILTER_FLAGS, "GTK_RECENT_FILTER_");
#endif
}
开发者ID:Mazwak,项目名称:ruby-gnome2,代码行数:25,代码来源:rbgtkrecentfilter.c
示例14: Init_gtk_gdk_image
void
Init_gtk_gdk_image(void)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_IMAGE, "Image", mGdk);
RG_DEF_METHOD(initialize, 4);
RG_DEF_METHOD(colormap, 0);
RG_DEF_METHOD(set_colormap, 1);
RG_DEF_METHOD(put_pixel, 3);
RG_DEF_METHOD(get_pixel, 2);
RG_DEF_METHOD(image_type, 0);
RG_DEF_METHOD(visual, 0);
RG_DEF_METHOD(byte_order, 0);
RG_DEF_METHOD(bits_per_pixel, 0);
RG_DEF_METHOD(width, 0);
RG_DEF_METHOD(height, 0);
RG_DEF_METHOD(depth, 0);
RG_DEF_METHOD(bpp, 0);
RG_DEF_METHOD(bpl, 0);
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
/* GdkImageType */
G_DEF_CLASS(GDK_TYPE_IMAGE_TYPE, "Type", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GDK_TYPE_IMAGE_TYPE, "GDK_IMAGE_");
}
开发者ID:msakai,项目名称:ruby-gnome2,代码行数:26,代码来源:rbgdkimage.c
示例15: Init_gtk_gdk_geometry
void
Init_gtk_gdk_geometry()
{
VALUE gdkGeometry = G_DEF_CLASS(GDK_TYPE_GEOMETRY, "Geometry", mGdk);
rb_define_method(gdkGeometry, "initialize", geo_initialize, 0);
rb_define_method(gdkGeometry, "min_width", geo_min_width, 0);
rb_define_method(gdkGeometry, "min_height", geo_min_height, 0);
rb_define_method(gdkGeometry, "max_width", geo_max_width, 0);
rb_define_method(gdkGeometry, "max_height", geo_max_height, 0);
rb_define_method(gdkGeometry, "base_width", geo_base_width, 0);
rb_define_method(gdkGeometry, "base_height", geo_base_height, 0);
rb_define_method(gdkGeometry, "width_inc", geo_width_inc, 0);
rb_define_method(gdkGeometry, "height_inc", geo_height_inc, 0);
rb_define_method(gdkGeometry, "min_aspect", geo_min_aspect, 0);
rb_define_method(gdkGeometry, "max_aspect", geo_max_aspect, 0);
rb_define_method(gdkGeometry, "win_gravity", geo_win_gravity, 0);
rb_define_method(gdkGeometry, "set", geo_set, 11);
rb_define_method(gdkGeometry, "set_min_width", geo_set_min_width, 1);
rb_define_method(gdkGeometry, "set_min_height", geo_set_min_height, 1);
rb_define_method(gdkGeometry, "set_max_width", geo_set_max_width, 1);
rb_define_method(gdkGeometry, "set_max_height", geo_set_max_height, 1);
rb_define_method(gdkGeometry, "set_base_width", geo_set_base_width, 1);
rb_define_method(gdkGeometry, "set_base_height", geo_set_base_height, 1);
rb_define_method(gdkGeometry, "set_width_inc", geo_set_width_inc, 1);
rb_define_method(gdkGeometry, "set_height_inc", geo_set_height_inc, 1);
rb_define_method(gdkGeometry, "set_min_aspect", geo_set_min_aspect, 1);
rb_define_method(gdkGeometry, "set_max_aspect", geo_set_max_aspect, 1);
rb_define_method(gdkGeometry, "set_win_gravity", geo_set_win_gravity, 1);
G_DEF_SETTERS(gdkGeometry);
}
开发者ID:benolee,项目名称:ruby-gnome2,代码行数:33,代码来源:rbgdkgeometry.c
示例16: Init_pangorenderer
void
Init_pangorenderer(VALUE mPango)
{
#if PANGO_CHECK_VERSION(1,8,0)
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_RENDERER, "Renderer", mPango);
RG_DEF_METHOD(draw_layout, 3);
RG_DEF_METHOD(draw_layout_line, 3);
RG_DEF_METHOD(draw_glyphs, 4);
RG_DEF_METHOD(draw_rectangle, 5);
RG_DEF_METHOD(draw_error_underline, 4);
RG_DEF_METHOD(draw_trapezoid, 7);
RG_DEF_METHOD(draw_glyph, 4);
RG_DEF_METHOD(activate, 0);
RG_DEF_METHOD(deactivate, 0);
RG_DEF_METHOD(part_changed, 1);
RG_DEF_METHOD(set_color, 2);
RG_DEF_METHOD(get_color, 1);
RG_DEF_METHOD(set_matrix, 1);
RG_DEF_METHOD(matrix, 0);
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
/* PangoRenderPart */
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
G_DEF_CLASS(PANGO_TYPE_RENDER_PART, "Part", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_RENDER_PART, "PANGO_RENDER_");
#endif
#endif
}
开发者ID:msakai,项目名称:ruby-gnome2,代码行数:31,代码来源:rbpangorenderer.c
示例17: Init_gtk_rcstyle
void
Init_gtk_rcstyle(VALUE mGtk)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_RC_STYLE, "RcStyle", mGtk);
RG_DEF_METHOD(initialize, 0);
RG_DEF_METHOD(color_flags, 1);
RG_DEF_METHOD(set_color_flags, 2);
RG_DEF_METHOD(name, 0);
RG_DEF_METHOD(set_name, 1);
RG_DEF_METHOD(bg_pixmap_name, 1);
RG_DEF_METHOD(set_bg_pixmap_name, 2);
RG_DEF_METHOD(font_desc, 0);
RG_DEF_METHOD(set_font_desc, 1);
rb_define_method(RG_TARGET_NAMESPACE, "fg", rcstyle_fg, 1);
rb_define_method(RG_TARGET_NAMESPACE, "bg", rcstyle_bg, 1);
rb_define_method(RG_TARGET_NAMESPACE, "text", rcstyle_text, 1);
rb_define_method(RG_TARGET_NAMESPACE, "base", rcstyle_base, 1);
rb_define_method(RG_TARGET_NAMESPACE, "set_fg", rcstyle_set_fg, 4);
rb_define_method(RG_TARGET_NAMESPACE, "set_bg", rcstyle_set_bg, 4);
rb_define_method(RG_TARGET_NAMESPACE, "set_text", rcstyle_set_text, 4);
rb_define_method(RG_TARGET_NAMESPACE, "set_base", rcstyle_set_base, 4);
RG_DEF_METHOD(xthickness, 0);
RG_DEF_METHOD(ythickness, 0);
RG_DEF_METHOD(set_xthickness, 1);
RG_DEF_METHOD(set_ythickness, 1);
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
}
开发者ID:aurelj,项目名称:ruby-gnome2,代码行数:28,代码来源:rbgtkrcstyle.c
示例18: Init_milter_event_loop
void
Init_milter_event_loop (void)
{
VALUE rb_cMilterEventLoop, rb_cMilterGLibEventLoop, rb_cMilterLibevEventLoop;
rb_cMilterEventLoop = G_DEF_CLASS_WITH_GC_FUNC(MILTER_TYPE_EVENT_LOOP,
"EventLoop", rb_mMilter,
mark, NULL);
rb_define_method(rb_cMilterEventLoop, "watch_io",
rb_loop_watch_io, -1);
rb_define_method(rb_cMilterEventLoop, "watch_child",
rb_loop_watch_child, -1);
rb_define_method(rb_cMilterEventLoop, "add_timeout",
rb_loop_add_timeout, -1);
rb_define_method(rb_cMilterEventLoop, "add_idle",
rb_loop_add_idle, -1);
rb_define_method(rb_cMilterEventLoop, "iterate", rb_loop_iterate, -1);
rb_define_method(rb_cMilterEventLoop, "run", rb_loop_run, 0);
rb_define_method(rb_cMilterEventLoop, "quit", rb_loop_quit, 0);
rb_define_method(rb_cMilterEventLoop, "remove", rb_loop_remove, 1);
G_DEF_SETTERS(rb_cMilterEventLoop);
rb_cMilterGLibEventLoop = G_DEF_CLASS(MILTER_TYPE_GLIB_EVENT_LOOP,
"GLibEventLoop", rb_mMilter);
rb_define_method(rb_cMilterGLibEventLoop, "initialize", glib_initialize, -1);
G_DEF_SETTERS(rb_cMilterGLibEventLoop);
rb_cMilterLibevEventLoop = G_DEF_CLASS(MILTER_TYPE_LIBEV_EVENT_LOOP,
"LibevEventLoop", rb_mMilter);
rb_define_singleton_method(rb_cMilterLibevEventLoop, "default",
libev_s_default, 0);
rb_define_method(rb_cMilterLibevEventLoop, "initialize",
libev_initialize, 0);
G_DEF_SETTERS(rb_cMilterGLibEventLoop);
}
开发者ID:suzuki,项目名称:milter-manager,代码行数:42,代码来源:rb-milter-event-loop.c
示例19: Init_milter_reply_encoder
void
Init_milter_reply_encoder (void)
{
VALUE rb_cMilterReplyEncoder;
rb_cMilterReplyEncoder =
G_DEF_CLASS(MILTER_TYPE_REPLY_ENCODER, "ReplyEncoder", rb_mMilter);
rb_define_method(rb_cMilterReplyEncoder, "initialize",
initialize, 0);
rb_define_method(rb_cMilterReplyEncoder, "encode_negotiate",
encode_negotiate, -1);
rb_define_method(rb_cMilterReplyEncoder, "encode_continue",
encode_continue, 0);
rb_define_method(rb_cMilterReplyEncoder, "encode_reply_code",
encode_reply_code, 1);
rb_define_method(rb_cMilterReplyEncoder, "encode_temporary_failure",
encode_temporary_failure, 0);
rb_define_method(rb_cMilterReplyEncoder, "encode_reject",
encode_reject, 0);
rb_define_method(rb_cMilterReplyEncoder, "encode_accept",
encode_accept, 0);
rb_define_method(rb_cMilterReplyEncoder, "encode_discard",
encode_discard, 0);
rb_define_method(rb_cMilterReplyEncoder, "encode_add_header",
encode_add_header, 2);
rb_define_method(rb_cMilterReplyEncoder, "encode_insert_header",
encode_insert_header, 3);
rb_define_method(rb_cMilterReplyEncoder, "encode_change_header",
encode_change_header, 3);
rb_define_method(rb_cMilterReplyEncoder, "encode_delete_header",
encode_delete_header, 2);
rb_define_method(rb_cMilterReplyEncoder, "encode_change_from",
encode_change_from, -1);
rb_define_method(rb_cMilterReplyEncoder, "encode_add_recipient",
encode_add_recipient, -1);
rb_define_method(rb_cMilterReplyEncoder, "encode_delete_recipient",
encode_delete_recipient, 1);
rb_define_method(rb_cMilterReplyEncoder, "encode_replace_body",
encode_replace_body, 1);
rb_define_method(rb_cMilterReplyEncoder, "encode_progress",
encode_progress, 0);
rb_define_method(rb_cMilterReplyEncoder, "encode_quarantine",
encode_quarantine, 1);
rb_define_method(rb_cMilterReplyEncoder, "encode_connection_failure",
encode_connection_failure, 0);
rb_define_method(rb_cMilterReplyEncoder, "encode_shutdown",
encode_shutdown, 0);
rb_define_method(rb_cMilterReplyEncoder, "encode_skip",
encode_skip, 0);
G_DEF_SETTERS(rb_cMilterReplyEncoder);
}
开发者ID:hayamiz,项目名称:milter-manager,代码行数:54,代码来源:rb-milter-reply-encoder.c
示例20: Init_gtk_clipboard
void
Init_gtk_clipboard(void)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_CLIPBOARD, "Clipboard", mGtk);
RG_DEF_SMETHOD(get, -1);
RG_DEF_METHOD(display, 0);
RG_DEF_METHOD(set, 1);
/*
RG_DEF_METHOD(owner, 0);
*/
RG_DEF_METHOD(clear, 0);
RG_DEF_METHOD(set_text, 1);
#if GTK_CHECK_VERSION(2,6,0)
RG_DEF_METHOD(set_image, 1);
#endif
RG_DEF_METHOD(request_contents, 1);
RG_DEF_METHOD(request_text, 0);
#if GTK_CHECK_VERSION(2,6,0)
RG_DEF_METHOD(request_image, 0);
#endif
#if GTK_CHECK_VERSION(2,4,0)
RG_DEF_METHOD(request_targets, 0);
#endif
#if GTK_CHECK_VERSION(2,10,0)
RG_DEF_METHOD(request_rich_text, 1);
#endif
RG_DEF_METHOD(wait_for_contents, 1);
RG_DEF_METHOD(wait_for_text, 0);
#if GTK_CHECK_VERSION(2,6,0)
RG_DEF_METHOD(wait_for_image, 0);
#endif
#if GTK_CHECK_VERSION(2,10,0)
RG_DEF_METHOD(wait_for_rich_text, 1);
#endif
RG_DEF_METHOD_P(wait_is_text_available, 0);
#if GTK_CHECK_VERSION(2,6,0)
RG_DEF_METHOD_P(wait_is_image_available, 0);
#endif
#if GTK_CHECK_VERSION(2,10,0)
RG_DEF_METHOD_P(wait_is_rich_text_available, 1);
#endif
#if GTK_CHECK_VERSION(2,4,0)
RG_DEF_METHOD(wait_for_targets, 0);
#endif
#if GTK_CHECK_VERSION(2,6,0)
RG_DEF_METHOD_P(wait_is_target_available, 1);
RG_DEF_METHOD(set_can_store, 1);
RG_DEF_METHOD(store, 0);
#endif
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
}
开发者ID:msakai,项目名称:ruby-gnome2,代码行数:53,代码来源:rbgtkclipboard.c
注:本文中的G_DEF_SETTERS函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论