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


C++ G_DEF_SETTERS函数代码示例

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


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


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