File: gobject.c

package info (click to toggle)
gtk-doc 1.35.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,192 kB
  • sloc: python: 9,923; ansic: 915; xml: 889; makefile: 535; sh: 364; lisp: 137; perl: 109
file content (21 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* example for gobject usage
 * checkout the article at http://en.wikipedia.org/wiki/GObject
 *
 * This example is part of the release, that can be downloaded
 * from ftp://ftp.gnome.org/pub/gnome/sources/gtk-doc/ or any mirror.
 */

#include <glib.h>
#include <glib-object.h>

gint
main(gint argc, gchar **argv)
{
  GObject *myobj;

  myobj = gtkdoc_object_new();
  g_object_set (myobj, "parameter", 5, NULL);
  g_object_unref (myobj);
  
  return 0;
}