本文整理汇总了C++中RG_DEF_METHOD函数的典型用法代码示例。如果您正苦于以下问题:C++ RG_DEF_METHOD函数的具体用法?C++ RG_DEF_METHOD怎么用?C++ RG_DEF_METHOD使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RG_DEF_METHOD函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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
}
示例2: Init_pango_matrix
void
Init_pango_matrix(VALUE mPango)
{
#if PANGO_CHECK_VERSION(1,6,0)
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_MATRIX, "Matrix", mPango);
RG_DEF_METHOD(initialize, -1);
RG_DEF_METHOD_BANG(translate, 2);
RG_DEF_METHOD_BANG(scale, 2);
RG_DEF_METHOD_BANG(rotate, 1);
RG_DEF_METHOD_BANG(concat, 1);
#if PANGO_CHECK_VERSION(1,12,0)
RG_DEF_METHOD(font_scale_factor, 0);
#endif
#if PANGO_CHECK_VERSION(1,16,0)
RG_DEF_METHOD(gravity, 0);
#endif
RG_DEF_METHOD(to_a, 0);
DEFINE_ACCESSOR(xx);
DEFINE_ACCESSOR(xy);
DEFINE_ACCESSOR(yx);
DEFINE_ACCESSOR(yy);
DEFINE_ACCESSOR(x0);
DEFINE_ACCESSOR(y0);
#endif
}
示例3: rb_gi_function_info_init
void
rb_gi_function_info_init(VALUE rb_mGI, VALUE rb_cGICallableInfo)
{
rb_cGLibError = rb_const_get(mGLib, rb_intern("Error"));
RG_TARGET_NAMESPACE =
G_DEF_CLASS_WITH_PARENT(GI_TYPE_FUNCTION_INFO, "FunctionInfo", rb_mGI,
rb_cGICallableInfo);
rb_iv_set(RG_TARGET_NAMESPACE, callbacks_key, rb_hash_new());
callback_finders = g_ptr_array_new();
rb_gi_callback_register_finder(source_func_callback_finder);
RG_DEF_METHOD(symbol, 0);
RG_DEF_METHOD(flags, 0);
RG_DEF_METHOD(property, 0);
RG_DEF_METHOD(vfunc, 0);
RG_DEF_METHOD(invoke, 1);
G_DEF_CLASS(G_TYPE_I_FUNCTION_INFO_FLAGS, "FunctionInfoFlags", rb_mGI);
rb_gi_method_info_init(rb_mGI, RG_TARGET_NAMESPACE);
rb_gi_constructor_info_init(rb_mGI, RG_TARGET_NAMESPACE);
}
示例4: 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
}
示例5: Init_gtk_gdk_region
void
Init_gtk_gdk_region(void)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GDK_TYPE_REGION, "Region", mGdk);
RG_DEF_METHOD(initialize, -1);
RG_DEF_METHOD(rectangles, 0);
RG_DEF_METHOD(spans_intersect_each, 2);
RG_DEF_METHOD(clipbox, 0);
RG_DEF_METHOD_P(empty, 0);
RG_DEF_METHOD_OPERATOR("==", equal, 1);
RG_DEF_METHOD_P(point_in, 2);
RG_DEF_METHOD(rect_in, 1);
RG_DEF_METHOD(offset, 2);
RG_DEF_METHOD(shrink, 2);
RG_DEF_METHOD(intersect, 1);
RG_DEF_METHOD(union, 1);
RG_DEF_METHOD(subtract, 1);
RG_DEF_METHOD(xor, 1);
/* GdkOverlapType */
G_DEF_CLASS(GDK_TYPE_OVERLAP_TYPE, "OverlapType", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GDK_TYPE_OVERLAP_TYPE, "GDK_");
/* GdkFillRule */
G_DEF_CLASS(GDK_TYPE_FILL_RULE, "FillRule", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GDK_TYPE_FILL_RULE, "GDK_");
}
示例6: Init_gtk_print_operation
void
Init_gtk_print_operation(VALUE mGtk)
{
RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_PRINT_OPERATION, "PrintOperation", mGtk);
G_DEF_ERROR(GTK_PRINT_ERROR, "PrintError", mGtk, rb_eRuntimeError,
GTK_TYPE_PRINT_ERROR);
RG_DEF_METHOD(initialize, 0);
RG_DEF_METHOD(run, -1);
RG_DEF_METHOD(error, 0);
RG_DEF_METHOD_P(finished, 0);
RG_DEF_METHOD(cancel, 0);
RG_DEF_SMETHOD(run_page_setup_dialog, -1);
/* GtkPrintStatus */
G_DEF_CLASS(GTK_TYPE_PRINT_STATUS, "Status", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_PRINT_STATUS, "GTK_PRINT_");
/* GtkPrintOperationAction */
G_DEF_CLASS(GTK_TYPE_PRINT_OPERATION_ACTION,"Action", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_PRINT_OPERATION_ACTION, "GTK_PRINT_OPERATION_");
/* GtkPrintOperationResult */
G_DEF_CLASS(GTK_TYPE_PRINT_OPERATION_RESULT, "Result", RG_TARGET_NAMESPACE);
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_PRINT_OPERATION_RESULT, "GTK_PRINT_OPERATION_");
}
示例7: Init_gtk_im_multicontext
void
Init_gtk_im_multicontext(VALUE mGtk)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_IM_MULTICONTEXT, "IMMulticontext", mGtk);
RG_DEF_METHOD(initialize, 0);
RG_DEF_METHOD(append_menuitems, 1);
}
示例8: Init_gtk_appchooserdialog
void
Init_gtk_appchooserdialog(VALUE mGtk)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_APP_CHOOSER_DIALOG, "AppChooserDialog", mGtk);
RG_DEF_METHOD(initialize, -1);
RG_DEF_METHOD(widget, 0);
}
示例9: Init_gtk_cellrenderertext
void
Init_gtk_cellrenderertext(VALUE mGtk)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_CELL_RENDERER_TEXT, "CellRendererText", mGtk);
RG_DEF_METHOD(initialize, 0);
RG_DEF_METHOD(set_fixed_height_from_font, 1);
}
示例10: Init_gmemoryinputstream
void
Init_gmemoryinputstream(VALUE glib)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_MEMORY_INPUT_STREAM, "MemoryInputStream", glib);
RG_DEF_METHOD(initialize, -1);
RG_DEF_METHOD(add_data, 1);
}
示例11: Init_gcharsetconverter
void
Init_gcharsetconverter(VALUE glib)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_CHARSET_CONVERTER, "CharsetConverter", glib);
RG_DEF_METHOD(initialize, 2);
RG_DEF_METHOD(num_fallbacks, 0);
}
示例12: Init_gtk_item
void
Init_gtk_item(void)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_ITEM, "Item", mGtk);
RG_DEF_METHOD(select, 0);
RG_DEF_METHOD(deselect, 0);
RG_DEF_METHOD(toggle, 0);
}
示例13: Init_gioschedulerjob
void
Init_gioschedulerjob(VALUE mGio)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_IO_SCHEDULER_JOB, "IOSchedulerJob", mGio);
RG_DEF_METHOD(send_to_mainloop, 0);
RG_DEF_METHOD(send_to_mainloop_async, 0);
}
示例14: Init_gtk_radio_button
void
Init_gtk_radio_button(VALUE mGtk)
{
RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_RADIO_BUTTON, "RadioButton", mGtk);
RG_DEF_METHOD(initialize, -1);
RG_DEF_METHOD(group, 0);
}
示例15: Init_gtk_aspect_frame
void
Init_gtk_aspect_frame(VALUE mGtk)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_ASPECT_FRAME, "AspectFrame", mGtk);
RG_DEF_METHOD(initialize, 5);
RG_DEF_METHOD(set, 4);
}