Re: Where is g_type_init()?

When you create a program in GTK and follow the roules, you'll need to init the GTK+, in the main function, using gtk_init, then make some stuff to create your main window and then call gtk_run to manage the events on button or other widgets you have in that window or others.

When you call gtk_init, you implicity call g_type_init; and you don't need to call it again in other part of your program.

2006/3/25, Paul Davis < paul linuxaudiosystems com>:
On Sun, 2006-03-26 at 02:28 +0000, DC A wrote:
> I'm trying to learn gtk+. And I have a question:
> According to api quote "Before using any GType or GObject functions,
> g_type_init() must be called to initialize the type system."
> So when I create GtkButton with g_object_new, where is this g_type_init()
> get called?

gtk_init (argc, argv);

gtk-list mailing list
gtk-list gnome org

Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (entrámite, pero para los cuates: LIBRE)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]