Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
GObject
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Usage== The combination of C and GObject is used in many successful [[free software]] projects, such as the [[GNOME]] desktop, the [[GTK]] toolkit and the [[GIMP]] image manipulation program. Though many GObject applications are written entirely in C, the GObject system maps well into the native object systems of many other languages, like [[C++]], [[Java (programming language)|Java]], [[Ruby programming language|Ruby]], [[Python (programming language)|Python]], [[Common Lisp]], and [[.NET Framework|.NET]]/[[Mono (software)|Mono]]. As a result, it is usually relatively painless to create [[language binding]]s for well-written libraries that use the GObject framework. Writing GObject code in C in the first place, however, is relatively verbose. The library takes a good deal of time to learn, and programmers with experience in [[high-level]] object-oriented languages often find it somewhat tedious to work with GObject in C. For example, creating a subclass (even just a subclass of <code>GObject</code>) can require writing and/or copying large amounts of [[boilerplate code]].<ref>{{cite web|title=How to define and implement a new GObject|url=https://developer.gnome.org/gobject/stable/howto-gobject.html|work=gnome.org|access-date=27 July 2013}}</ref> However, using [[Vala (programming language)|Vala]], a language that is designed primarily to work with GObject and which converts to C, is likely to make working with GObject or writing GObject based libraries nicer. Although they are not really [[first-class object]]s (there are no actual metatypes in GType), [[metaobject]]s like classes and interfaces are created by GObject applications at runtime, and provide good support for [[introspection (computer science)|introspection]]. The introspective capabilities are used by language bindings and user interface design applications like [[Glade Interface Designer|Glade]] to allow doing things like loading a [[shared library]] that provides a GObject class—usually some kind of [[Web widget|widget]], in the case of Glade—and then obtain a list of all properties of the class, complete with type information and documentation strings.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)