-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Uzytkownik <[EMAIL PROTECTED]> writes:
> I'm newbie in GObject(before I use C++). > Can I create object with arguments? > In C++: > class xyz > { > public: > xyz(int i); > }; Yes. As a (poor) example: MyClass * my_class_new(gint foo, const gchar *bar) { return MY_CLASS(g_object_new(MY_TYPE_CLASS, "foo", foo, "bar", bar, NULL)); } This passes "construction parameters" to g_object_new. When the object is constructed, the construction parameters are set for the object. These are object properties installed with g_object_class_install_property() with G_PARAM_CONSTRUCT. See the GObject tutorial for examples (http://www.le-hacker.org/papers/gobject/) Regards, Roger - -- Roger Leigh Printing on GNU/Linux? http://gimp-print.sourceforge.net/ Debian GNU/Linux http://www.debian.org/ GPG Public Key: 0x25BFB848. Please sign and encrypt your mail. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/> iD8DBQFCYr7VVcFcaSW/uEgRAqxuAJ0b2oUGpQhsC8X405YX1sVycGZXbgCgovRD qOzM4DZxOCvsmZsnOkTaEU4= =FbBX -----END PGP SIGNATURE----- _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list