chez-libs

Hex Artifact Content
Login

Artifact eb94b53c55d8a3a6321655288dcbeb4361238bdc:

Wiki page [(system glib)] by murphy 2016-06-03 13:26:51.
0000: 44 20 32 30 31 36 2d 30 36 2d 30 33 54 31 33 3a  D 2016-06-03T13:
0010: 32 36 3a 35 31 2e 31 30 38 0a 4c 20 28 73 79 73  26:51.108.L (sys
0020: 74 65 6d 5c 73 67 6c 69 62 29 0a 50 20 66 30 38  tem\sglib).P f08
0030: 62 32 34 39 38 61 38 64 37 61 34 62 34 38 38 39  b2498a8d7a4b4889
0040: 35 30 32 39 38 31 31 61 37 66 31 39 33 61 36 62  5029811a7f193a6b
0050: 66 63 61 62 64 0a 55 20 6d 75 72 70 68 79 0a 57  fcabd.U murphy.W
0060: 20 39 33 33 39 0a 3c 68 31 3e 47 4c 69 62 20 42   9339.<h1>GLib B
0070: 69 6e 64 69 6e 67 73 3c 2f 68 31 3e 0d 0a 0d 0a  indings</h1>....
0080: 3c 68 32 3e 53 79 6e 6f 70 73 69 73 3c 2f 68 32  <h2>Synopsis</h2
0090: 3e 0d 0a 0d 0a 3c 63 6f 64 65 3e 28 69 6d 70 6f  >....<code>(impo
00a0: 72 74 20 28 73 79 73 74 65 6d 20 67 6c 69 62 29  rt (system glib)
00b0: 29 3c 2f 63 6f 64 65 3e 0d 0a 0d 0a 42 69 6e 64  )</code>....Bind
00c0: 69 6e 67 73 20 74 6f 20 73 6f 6d 65 20 66 75 6e  ings to some fun
00d0: 63 74 69 6f 6e 61 6c 69 74 79 20 6f 66 20 74 68  ctionality of th
00e0: 65 20 5b 68 74 74 70 73 3a 2f 2f 64 65 76 65 6c  e [https://devel
00f0: 6f 70 65 72 2e 67 6e 6f 6d 65 2e 6f 72 67 2f 67  oper.gnome.org/g
0100: 6c 69 62 2f 73 74 61 62 6c 65 2f 7c 47 4c 69 62  lib/stable/|GLib
0110: 5d 20 6c 69 62 72 61 72 79 2e 0d 0a 0d 0a 3c 68  ] library.....<h
0120: 32 3e 4e 61 74 69 76 65 20 4d 65 6d 6f 72 79 3c  2>Native Memory<
0130: 2f 68 32 3e 0d 0a 0d 0a 57 68 65 6e 20 74 68 65  /h2>....When the
0140: 20 6c 69 62 72 61 72 79 20 62 6f 64 79 20 72 75   library body ru
0150: 6e 73 2c 20 3c 74 74 3e 67 6c 69 62 2d 61 6c 6c  ns, <tt>glib-all
0160: 6f 63 3c 2f 74 74 3e 20 61 6e 64 20 3c 74 74 3e  oc</tt> and <tt>
0170: 67 6c 69 62 2d 66 72 65 65 3c 2f 74 74 3e 20 61  glib-free</tt> a
0180: 72 65 20 72 65 67 69 73 74 65 72 65 64 20 61 73  re registered as
0190: 20 74 68 65 20 63 75 72 72 65 6e 74 20 3c 74 74   the current <tt
01a0: 3e 68 65 61 70 2d 61 6c 6c 6f 63 61 74 6f 72 3c  >heap-allocator<
01b0: 2f 74 74 3e 20 66 6f 72 20 3c 74 74 3e 5b 28 73  /tt> for <tt>[(s
01c0: 79 73 74 65 6d 20 68 65 61 70 29 5d 3c 2f 74 74  ystem heap)]</tt
01d0: 3e 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64  >.....<h3>proced
01e0: 75 72 65 3a 20 3c 63 6f 64 65 3e 28 67 6c 69 62  ure: <code>(glib
01f0: 2d 61 6c 6c 6f 63 20 3c 69 3e 6e 3c 2f 69 3e 29  -alloc <i>n</i>)
0200: 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a  </code></h3>....
0210: 41 6c 6c 6f 63 61 74 65 73 20 74 68 65 20 72 65  Allocates the re
0220: 71 75 65 73 74 65 64 20 6e 75 6d 62 65 72 20 6f  quested number o
0230: 66 20 62 79 74 65 73 20 6f 66 20 66 6f 72 65 69  f bytes of forei
0240: 67 6e 20 6d 65 6d 6f 72 79 20 61 6e 64 20 72 65  gn memory and re
0250: 74 75 72 6e 73 20 74 68 65 20 61 64 64 72 65 73  turns the addres
0260: 73 2e 20 49 66 20 7a 65 72 6f 20 62 79 74 65 73  s. If zero bytes
0270: 20 61 72 65 20 72 65 71 75 65 73 74 65 64 20 61   are requested a
0280: 20 6e 75 6c 6c 20 70 6f 69 6e 74 65 72 20 69 73   null pointer is
0290: 20 72 65 74 75 72 6e 65 64 2e 0d 0a 0d 0a 4d 65   returned.....Me
02a0: 6d 6f 72 79 20 62 6c 6f 63 6b 73 20 72 65 74 75  mory blocks retu
02b0: 72 6e 65 64 20 62 79 20 3c 74 74 3e 67 6c 69 62  rned by <tt>glib
02c0: 2d 61 6c 6c 6f 63 3c 2f 74 74 3e 20 61 72 65 20  -alloc</tt> are 
02d0: 66 69 6c 6c 65 64 20 77 69 74 68 20 7a 65 72 6f  filled with zero
02e0: 20 62 79 74 65 73 2e 0d 0a 0d 0a 3c 68 33 3e 70   bytes.....<h3>p
02f0: 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e  rocedure: <code>
0300: 28 67 6c 69 62 2d 66 72 65 65 20 3c 69 3e 61 64  (glib-free <i>ad
0310: 64 72 65 73 73 3c 2f 69 3e 29 3c 2f 63 6f 64 65  dress</i>)</code
0320: 3e 3c 2f 68 33 3e 0d 0a 0d 0a 46 72 65 65 73 20  ></h3>....Frees 
0330: 74 68 65 20 6d 65 6d 6f 72 79 20 6c 6f 63 61 74  the memory locat
0340: 65 64 20 61 74 20 74 68 65 20 73 70 65 63 69 66  ed at the specif
0350: 69 65 64 20 61 64 64 72 65 73 73 2c 20 77 68 69  ied address, whi
0360: 63 68 20 77 61 73 20 70 72 65 76 69 6f 75 73 6c  ch was previousl
0370: 79 20 61 6c 6c 6f 63 61 74 65 64 20 75 73 69 6e  y allocated usin
0380: 67 20 3c 74 74 3e 67 6c 69 62 2d 61 6c 6c 6f 63  g <tt>glib-alloc
0390: 3c 2f 74 74 3e 2e 0d 0a 0d 0a 3c 68 32 3e 51 75  </tt>.....<h2>Qu
03a0: 61 72 6b 73 3c 2f 68 32 3e 0d 0a 0d 0a 3c 68 33  arks</h2>....<h3
03b0: 3e 70 72 6f 63 65 63 75 72 65 3a 20 3c 63 6f 64  >procecure: <cod
03c0: 65 3e 28 73 79 6d 62 6f 6c 2d 3e 71 75 61 72 6b  e>(symbol->quark
03d0: 20 3c 69 3e 73 79 6d 62 6f 6c 3c 2f 69 3e 29 3c   <i>symbol</i>)<
03e0: 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 43  /code></h3>....C
03f0: 6f 6e 76 65 72 74 73 20 61 20 73 79 6d 62 6f 6c  onverts a symbol
0400: 20 69 6e 74 6f 20 61 20 47 51 75 61 72 6b 20 69   into a GQuark i
0410: 6e 74 65 67 65 72 2c 20 72 65 67 69 73 74 65 72  nteger, register
0420: 69 6e 67 20 74 68 65 20 73 79 6d 62 6f 6c 27 73  ing the symbol's
0430: 20 6e 61 6d 65 20 61 73 20 61 20 6e 65 77 20 71   name as a new q
0440: 75 61 72 6b 2c 20 69 66 20 6e 65 63 65 73 73 61  uark, if necessa
0450: 72 79 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65  ry.....<h3>proce
0460: 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28 71 75 61  dure: <code>(qua
0470: 72 6b 2d 3e 73 79 6d 62 6f 6c 20 3c 69 3e 69 6e  rk->symbol <i>in
0480: 74 65 67 65 72 3c 2f 69 3e 29 3c 2f 63 6f 64 65  teger</i>)</code
0490: 3e 3c 2f 68 33 3e 0d 0a 0d 0a 43 6f 6e 76 65 72  ></h3>....Conver
04a0: 74 73 20 61 20 47 51 75 61 72 6b 20 69 6e 74 65  ts a GQuark inte
04b0: 67 65 72 20 69 6e 74 6f 20 61 20 73 79 6d 62 6f  ger into a symbo
04c0: 6c 20 77 69 74 68 20 74 68 65 20 73 61 6d 65 20  l with the same 
04d0: 6e 61 6d 65 2e 20 52 65 74 75 72 6e 73 20 3c 74  name. Returns <t
04e0: 74 3e 23 66 3c 2f 74 74 3e 20 69 66 20 74 68 65  t>#f</tt> if the
04f0: 20 67 69 76 65 6e 20 6e 75 6d 62 65 72 20 69 73   given number is
0500: 20 6e 6f 74 20 61 20 72 65 67 69 73 74 65 72 65   not a registere
0510: 64 20 71 75 61 72 6b 2e 0d 0a 0d 0a 3c 68 32 3e  d quark.....<h2>
0520: 43 6f 6e 64 69 74 69 6f 6e 73 3c 2f 68 32 3e 0d  Conditions</h2>.
0530: 0a 0d 0a 3c 68 33 3e 63 6f 6e 64 69 74 69 6f 6e  ...<h3>condition
0540: 3a 20 3c 63 6f 64 65 3e 26 67 65 72 72 6f 72 3c  : <code>&gerror<
0550: 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 3c 68 33  /code></h3>..<h3
0560: 3e 70 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64  >procedure: <cod
0570: 65 3e 28 67 65 72 72 6f 72 2d 63 6f 6e 64 69 74  e>(gerror-condit
0580: 69 6f 6e 3f 20 3c 69 3e 61 6e 79 3c 2f 69 3e 29  ion? <i>any</i>)
0590: 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 3c 68  </code></h3>..<h
05a0: 33 3e 70 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f  3>procedure: <co
05b0: 64 65 3e 28 6d 61 6b 65 2d 67 65 72 72 6f 72 2d  de>(make-gerror-
05c0: 63 6f 6e 64 69 74 69 6f 6e 20 3c 69 3e 6d 65 73  condition <i>mes
05d0: 73 61 67 65 3c 2f 69 3e 20 3c 69 3e 64 6f 6d 61  sage</i> <i>doma
05e0: 69 6e 3c 2f 69 3e 20 3c 69 3e 63 6f 64 65 3c 2f  in</i> <i>code</
05f0: 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d  i>)</code></h3>.
0600: 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72 65 3a 20  .<h3>procedure: 
0610: 3c 63 6f 64 65 3e 28 63 6f 6e 64 69 74 69 6f 6e  <code>(condition
0620: 2d 64 6f 6d 61 69 6e 20 3c 69 3e 63 6f 6e 64 69  -domain <i>condi
0630: 74 69 6f 6e 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e  tion</i>)</code>
0640: 3c 2f 68 33 3e 0d 0a 3c 68 33 3e 70 72 6f 63 65  </h3>..<h3>proce
0650: 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28 63 6f 6e  dure: <code>(con
0660: 64 69 74 69 6f 6e 2d 63 6f 64 65 20 3c 69 3e 63  dition-code <i>c
0670: 6f 6e 64 69 74 69 6f 6e 3c 2f 69 3e 29 3c 2f 63  ondition</i>)</c
0680: 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 54 68 65  ode></h3>....The
0690: 20 3c 74 74 3e 26 67 65 72 72 6f 72 3c 2f 74 74   <tt>&gerror</tt
06a0: 3e 20 63 6f 6e 64 69 74 69 6f 6e 20 74 79 70 65  > condition type
06b0: 20 69 73 20 64 65 72 69 76 65 64 20 66 72 6f 6d   is derived from
06c0: 20 3c 74 74 3e 26 6d 65 73 73 61 67 65 3c 2f 74   <tt>&message</t
06d0: 74 3e 20 61 6e 64 20 73 74 6f 72 65 73 20 74 68  t> and stores th
06e0: 65 20 65 72 72 6f 72 20 63 61 74 65 67 6f 72 79  e error category
06f0: 20 61 6e 64 20 65 72 72 6f 72 20 63 6f 64 65 20   and error code 
0700: 74 6f 67 65 74 68 65 72 20 77 69 74 68 20 61 20  together with a 
0710: 68 75 6d 61 6e 2d 72 65 61 64 61 62 6c 65 20 6d  human-readable m
0720: 65 73 73 61 67 65 2e 0d 0a 0d 0a 3c 68 33 3e 70  essage.....<h3>p
0730: 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e  rocedure: <code>
0740: 28 63 61 6c 6c 2d 77 69 74 68 2d 67 65 72 72 6f  (call-with-gerro
0750: 72 20 3c 69 3e 77 68 6f 3c 2f 69 3e 20 3c 69 3e  r <i>who</i> <i>
0760: 70 72 6f 63 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e  proc</i>)</code>
0770: 3c 2f 68 33 3e 0d 0a 0d 0a 41 6c 6c 6f 63 61 74  </h3>....Allocat
0780: 65 73 20 61 20 6d 65 6d 6f 72 79 20 6c 6f 63 61  es a memory loca
0790: 74 69 6f 6e 20 74 68 61 74 20 6d 61 79 20 68 6f  tion that may ho
07a0: 6c 64 20 61 20 47 45 72 72 6f 72 20 70 6f 69 6e  ld a GError poin
07b0: 74 65 72 20 61 6e 64 20 70 61 73 73 65 73 20 69  ter and passes i
07c0: 74 73 20 61 64 64 72 65 73 73 20 74 6f 20 74 68  ts address to th
07d0: 65 20 67 69 76 65 6e 20 70 72 6f 63 65 64 75 72  e given procedur
07e0: 65 2e 20 4f 6e 63 65 20 74 68 65 20 70 72 6f 63  e. Once the proc
07f0: 65 64 75 72 65 20 72 65 74 75 72 6e 73 2c 20 74  edure returns, t
0800: 68 65 20 65 72 72 6f 72 20 6c 6f 63 61 74 69 6f  he error locatio
0810: 6e 20 69 73 20 65 78 61 6d 69 6e 65 64 3a 20 49  n is examined: I
0820: 66 20 69 74 20 63 6f 6e 74 61 69 6e 73 20 61 20  f it contains a 
0830: 47 45 72 72 6f 72 20 69 6e 73 74 61 6e 63 65 2c  GError instance,
0840: 20 69 74 20 69 73 20 63 6c 65 61 72 65 64 20 61   it is cleared a
0850: 6e 64 20 74 68 65 20 65 72 72 6f 72 20 69 73 20  nd the error is 
0860: 72 61 69 73 65 64 20 61 73 20 61 20 63 6f 6e 64  raised as a cond
0870: 69 74 69 6f 6e 20 77 69 74 68 20 74 79 70 65 73  ition with types
0880: 20 3c 74 74 3e 26 65 72 72 6f 72 3c 2f 74 74 3e   <tt>&error</tt>
0890: 2c 20 3c 74 74 3e 26 77 68 6f 3c 2f 74 74 3e 20  , <tt>&who</tt> 
08a0: 61 6e 64 20 3c 74 74 3e 26 67 65 72 72 6f 72 3c  and <tt>&gerror<
08b0: 2f 74 74 3e 2e 20 49 66 20 74 68 65 72 65 20 77  /tt>. If there w
08c0: 61 73 20 6e 6f 20 65 72 72 6f 72 2c 20 3c 74 74  as no error, <tt
08d0: 3e 63 61 6c 6c 2d 77 69 74 68 2d 67 65 72 72 6f  >call-with-gerro
08e0: 72 3c 2f 74 74 3e 20 72 65 74 75 72 6e 73 20 77  r</tt> returns w
08f0: 68 61 74 65 76 65 72 20 3c 74 74 3e 70 72 6f 63  hatever <tt>proc
0900: 3c 2f 74 74 3e 20 72 65 74 75 72 6e 73 2e 0d 0a  </tt> returns...
0910: 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72 65 3a  ..<h3>procedure:
0920: 20 3c 63 6f 64 65 3e 28 77 69 74 68 2d 67 65 72   <code>(with-ger
0930: 72 6f 72 2d 67 75 61 72 64 20 3c 69 3e 61 64 64  ror-guard <i>add
0940: 72 65 73 73 3c 2f 69 3e 20 3c 69 3e 74 68 75 6e  ress</i> <i>thun
0950: 6b 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68  k</i>)</code></h
0960: 33 3e 0d 0a 0d 0a 52 75 6e 73 20 74 68 65 20 67  3>....Runs the g
0970: 69 76 65 6e 20 70 72 6f 63 65 65 64 75 72 65 20  iven proceedure 
0980: 77 69 74 68 6f 75 74 20 61 72 67 75 6d 65 6e 74  without argument
0990: 73 20 61 6e 64 20 63 6f 6e 76 65 72 74 73 20 61  s and converts a
09a0: 6e 79 20 63 6f 6e 64 69 74 69 6f 6e 20 72 61 69  ny condition rai
09b0: 73 65 64 20 62 79 20 69 74 20 69 6e 74 6f 20 61  sed by it into a
09c0: 20 47 45 72 72 6f 72 2c 20 77 68 69 63 68 20 69   GError, which i
09d0: 73 20 73 74 6f 72 65 64 20 61 74 20 74 68 65 20  s stored at the 
09e0: 67 69 76 65 6e 20 6d 65 6d 6f 72 79 20 61 64 64  given memory add
09f0: 72 65 73 73 2e 20 49 66 20 61 20 63 6f 6e 64 69  ress. If a condi
0a00: 74 69 6f 6e 20 77 61 73 20 72 61 69 73 65 64 2c  tion was raised,
0a10: 20 3c 74 74 3e 77 69 74 68 2d 67 65 72 72 6f 72   <tt>with-gerror
0a20: 2d 67 75 61 72 64 3c 2f 74 74 3e 20 72 65 74 75  -guard</tt> retu
0a30: 72 6e 73 20 3c 74 74 3e 23 66 3c 2f 74 74 3e 2c  rns <tt>#f</tt>,
0a40: 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65   otherwise it re
0a50: 74 75 72 6e 73 20 77 68 61 74 65 76 65 72 20 3c  turns whatever <
0a60: 74 74 3e 74 68 75 6e 6b 3c 2f 74 74 3e 20 72 65  tt>thunk</tt> re
0a70: 74 75 72 6e 73 2e 0d 0a 0d 0a 3c 68 33 3e 70 72  turns.....<h3>pr
0a80: 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28  ocedure: <code>(
0a90: 6c 6f 67 2d 63 6f 6e 64 69 74 69 6f 6e 20 3c 69  log-condition <i
0aa0: 3e 76 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f  >v</i>)</code></
0ab0: 68 33 3e 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75  h3>..<h3>procedu
0ac0: 72 65 3a 20 3c 63 6f 64 65 3e 28 6c 6f 67 2d 63  re: <code>(log-c
0ad0: 6f 6e 64 69 74 69 6f 6e 20 3c 69 3e 76 3c 2f 69  ondition <i>v</i
0ae0: 3e 20 3c 69 3e 64 6f 6d 61 69 6e 3c 2f 69 3e 29  > <i>domain</i>)
0af0: 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a  </code></h3>....
0b00: 46 6f 72 6d 61 74 73 20 74 68 65 20 67 69 76 65  Formats the give
0b10: 6e 20 76 61 6c 75 65 20 69 6e 20 61 6e 20 65 72  n value in an er
0b20: 72 6f 72 20 6d 65 73 73 61 67 65 20 61 6e 64 20  ror message and 
0b30: 70 61 73 73 65 73 20 69 74 20 74 6f 20 74 68 65  passes it to the
0b40: 20 47 4c 69 62 20 6c 6f 67 67 69 6e 67 20 73 79   GLib logging sy
0b50: 73 74 65 6d 2c 20 6f 70 74 69 6f 6e 61 6c 6c 79  stem, optionally
0b60: 20 77 69 74 68 20 74 68 65 20 67 69 76 65 6e 20   with the given 
0b70: 6c 6f 67 67 69 6e 67 20 64 6f 6d 61 69 6e 2e 20  logging domain. 
0b80: 49 66 20 74 68 65 20 76 61 6c 75 65 20 69 73 20  If the value is 
0b90: 61 20 77 61 72 6e 69 6e 67 20 63 6f 6e 64 69 74  a warning condit
0ba0: 69 6f 6e 2c 20 74 68 65 20 6d 65 73 73 61 67 65  ion, the message
0bb0: 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67 65 64 20   will be logged 
0bc0: 61 74 20 3c 74 74 3e 47 5f 4c 4f 47 5f 4c 45 56  at <tt>G_LOG_LEV
0bd0: 45 4c 5f 57 41 52 4e 49 4e 47 3c 2f 74 74 3e 20  EL_WARNING</tt> 
0be0: 61 6e 64 20 74 68 65 20 70 72 6f 63 65 64 75 72  and the procedur
0bf0: 65 20 72 65 74 75 72 6e 73 20 3c 74 74 3e 23 74  e returns <tt>#t
0c00: 3c 2f 74 74 3e 2c 20 6f 74 68 65 72 77 69 73 65  </tt>, otherwise
0c10: 20 69 74 20 77 69 6c 6c 20 62 65 20 6c 6f 67 67   it will be logg
0c20: 65 64 20 61 74 20 3c 74 74 3e 47 5f 4c 4f 47 5f  ed at <tt>G_LOG_
0c30: 4c 45 56 45 4c 5f 43 52 49 54 49 43 41 4c 3c 2f  LEVEL_CRITICAL</
0c40: 74 74 3e 20 61 6e 64 20 74 68 65 20 70 72 6f 63  tt> and the proc
0c50: 65 64 75 72 65 20 72 65 74 75 72 6e 73 20 3c 74  edure returns <t
0c60: 74 3e 23 66 3c 2f 74 74 3e 2e 0d 0a 0d 0a 3c 68  t>#f</tt>.....<h
0c70: 32 3e 43 6c 6f 73 75 72 65 73 3c 2f 68 32 3e 0d  2>Closures</h2>.
0c80: 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72 65  ...<h3>procedure
0c90: 3a 20 3c 63 6f 64 65 3e 28 63 6c 6f 73 75 72 65  : <code>(closure
0ca0: 2d 61 6c 6c 6f 63 20 3c 69 3e 70 72 6f 63 3c 2f  -alloc <i>proc</
0cb0: 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d  i>)</code></h3>.
0cc0: 0a 0d 0a 43 72 65 61 74 65 73 20 61 20 6e 61 74  ...Creates a nat
0cd0: 69 76 65 20 47 43 6c 6f 73 75 72 65 20 6f 62 6a  ive GClosure obj
0ce0: 65 63 74 20 74 68 61 74 20 63 61 6c 6c 73 20 74  ect that calls t
0cf0: 68 65 20 67 69 76 65 6e 20 53 63 68 65 6d 65 20  he given Scheme 
0d00: 70 72 6f 63 65 64 75 72 65 20 77 68 65 6e 20 69  procedure when i
0d10: 6e 76 6f 6b 65 64 2e 20 4c 6f 63 6b 73 20 74 68  nvoked. Locks th
0d20: 65 20 70 72 6f 63 65 64 75 72 65 20 69 6e 20 6d  e procedure in m
0d30: 65 6d 6f 72 79 2e 20 52 65 74 75 72 6e 73 20 74  emory. Returns t
0d40: 68 65 20 6d 65 6d 6f 72 79 20 61 64 64 72 65 73  he memory addres
0d50: 73 20 6f 66 20 74 68 65 20 63 6c 6f 73 75 72 65  s of the closure
0d60: 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75  .....<h3>procedu
0d70: 72 65 3a 20 3c 63 6f 64 65 3e 28 63 6c 6f 73 75  re: <code>(closu
0d80: 72 65 2d 66 72 65 65 20 3c 69 3e 61 64 64 72 65  re-free <i>addre
0d90: 73 73 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f  ss</i>)</code></
0da0: 68 33 3e 0d 0a 0d 0a 44 65 63 72 65 6d 65 6e 74  h3>....Decrement
0db0: 73 20 74 68 65 20 72 65 66 65 72 65 6e 63 65 20  s the reference 
0dc0: 63 6f 75 6e 74 20 6f 66 20 74 68 65 20 6e 61 74  count of the nat
0dd0: 69 76 65 20 63 6c 6f 73 75 72 65 20 61 74 20 74  ive closure at t
0de0: 68 65 20 67 69 76 65 6e 20 61 64 64 72 65 73 73  he given address
0df0: 2e 20 4f 6e 63 65 20 74 68 65 20 63 6c 6f 73 75  . Once the closu
0e00: 72 65 20 69 73 20 64 65 73 74 72 6f 79 65 64 2c  re is destroyed,
0e10: 20 74 68 65 20 62 61 63 6b 69 6e 67 20 53 63 68   the backing Sch
0e20: 65 6d 65 20 70 72 6f 63 65 64 75 72 65 20 69 73  eme procedure is
0e30: 20 75 6e 6c 6f 63 6b 65 64 2e 0d 0a 0d 0a 3c 68   unlocked.....<h
0e40: 32 3e 4d 61 69 6e 20 4c 6f 6f 70 73 3c 2f 68 32  2>Main Loops</h2
0e50: 3e 0d 0a 0d 0a 3c 68 33 3e 70 61 72 61 6d 65 74  >....<h3>paramet
0e60: 65 72 3a 20 3c 63 6f 64 65 3e 6d 61 69 6e 2d 6c  er: <code>main-l
0e70: 6f 6f 70 2d 63 6f 6e 74 65 78 74 3c 2f 63 6f 64  oop-context</cod
0e80: 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 54 68 65 20 70  e></h3>....The p
0e90: 61 72 61 6d 65 74 65 72 20 68 6f 6c 64 73 20 74  arameter holds t
0ea0: 68 65 20 6e 61 74 69 76 65 20 61 64 64 72 65 73  he native addres
0eb0: 73 20 6f 66 20 74 68 65 20 6d 61 69 6e 20 6c 6f  s of the main lo
0ec0: 6f 70 20 63 6f 6e 74 65 78 74 20 74 6f 20 75 73  op context to us
0ed0: 65 20 61 6e 64 20 69 73 20 69 6e 69 74 69 61 6c  e and is initial
0ee0: 69 7a 65 64 20 74 6f 20 74 68 65 20 64 65 66 61  ized to the defa
0ef0: 75 6c 74 20 47 4d 61 69 6e 43 6f 6e 74 65 78 74  ult GMainContext
0f00: 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75  .....<h3>procedu
0f10: 72 65 3a 20 3c 63 6f 64 65 3e 28 6d 61 69 6e 2d  re: <code>(main-
0f20: 6c 6f 6f 70 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33  loop)</code></h3
0f30: 3e 0d 0a 0d 0a 52 75 6e 73 20 61 20 6d 61 69 6e  >....Runs a main
0f40: 20 6c 6f 6f 70 20 66 6f 72 20 74 68 65 20 3c 74   loop for the <t
0f50: 74 3e 6d 61 69 6e 2d 6c 6f 6f 70 2d 63 6f 6e 74  t>main-loop-cont
0f60: 65 78 74 3c 2f 74 74 3e 2e 0d 0a 0d 0a 3c 68 33  ext</tt>.....<h3
0f70: 3e 70 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64  >procedure: <cod
0f80: 65 3e 28 6d 61 69 6e 2d 6c 6f 6f 70 2d 72 75 6e  e>(main-loop-run
0f90: 6e 69 6e 67 3f 29 3c 2f 63 6f 64 65 3e 3c 2f 68  ning?)</code></h
0fa0: 33 3e 0d 0a 0d 0a 52 65 74 75 72 6e 73 20 61 20  3>....Returns a 
0fb0: 62 6f 6f 6c 65 61 6e 20 69 6e 64 69 63 61 74 69  boolean indicati
0fc0: 6e 67 20 77 68 65 74 68 65 72 20 61 20 6d 61 69  ng whether a mai
0fd0: 6e 20 6c 6f 6f 70 20 69 73 20 63 75 72 72 65 6e  n loop is curren
0fe0: 74 6c 79 20 72 75 6e 6e 69 6e 67 2e 0d 0a 0d 0a  tly running.....
0ff0: 3c 68 33 3e 70 72 6f 63 65 64 75 72 65 3a 20 3c  <h3>procedure: <
1000: 63 6f 64 65 3e 28 6d 61 69 6e 2d 6c 6f 6f 70 2d  code>(main-loop-
1010: 71 75 69 74 21 29 3c 2f 63 6f 64 65 3e 3c 2f 68  quit!)</code></h
1020: 33 3e 0d 0a 0d 0a 53 74 6f 70 73 20 74 68 65 20  3>....Stops the 
1030: 69 6e 6e 65 72 6d 6f 73 74 20 6d 61 69 6e 20 6c  innermost main l
1040: 6f 6f 70 20 63 75 72 72 65 6e 74 6c 79 20 72 75  oop currently ru
1050: 6e 6e 69 6e 67 20 66 6f 72 20 74 68 65 20 3c 74  nning for the <t
1060: 74 3e 6d 61 69 6e 2d 6c 6f 6f 70 2d 63 6f 6e 74  t>main-loop-cont
1070: 65 78 74 3c 2f 74 74 3e 2c 20 69 66 20 61 6e 79  ext</tt>, if any
1080: 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75  .....<h3>procedu
1090: 72 65 3a 20 3c 63 6f 64 65 3e 28 6d 61 69 6e 2d  re: <code>(main-
10a0: 6c 6f 6f 70 2d 72 65 6d 6f 76 65 21 20 3c 69 3e  loop-remove! <i>
10b0: 69 6e 74 65 67 65 72 3c 2f 69 3e 29 3c 2f 63 6f  integer</i>)</co
10c0: 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 52 65 6d 6f  de></h3>....Remo
10d0: 76 65 73 20 74 68 65 20 73 6f 75 72 63 65 20 77  ves the source w
10e0: 69 74 68 20 74 68 65 20 67 69 76 65 6e 20 69 64  ith the given id
10f0: 65 6e 74 69 66 69 65 72 20 66 72 6f 6d 20 74 68  entifier from th
1100: 65 20 3c 74 74 3e 6d 61 69 6e 2d 6c 6f 6f 70 2d  e <tt>main-loop-
1110: 63 6f 6e 74 65 78 74 3c 2f 74 74 3e 2e 20 52 65  context</tt>. Re
1120: 74 75 72 6e 73 20 61 20 62 6f 6f 6c 65 61 6e 20  turns a boolean 
1130: 69 6e 64 69 63 61 74 69 6e 67 20 77 68 65 74 68  indicating wheth
1140: 65 72 20 74 68 65 20 6f 70 65 72 61 74 69 6f 6e  er the operation
1150: 20 77 61 73 20 73 75 63 63 65 73 73 66 75 6c 2e   was successful.
1160: 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72  ....<h3>procedur
1170: 65 3a 20 3c 63 6f 64 65 3e 28 6d 61 69 6e 2d 6c  e: <code>(main-l
1180: 6f 6f 70 2d 74 69 6d 65 6f 75 74 20 3c 69 3e 69  oop-timeout <i>i
1190: 6e 74 65 72 76 61 6c 3c 2f 69 3e 20 3c 69 3e 74  nterval</i> <i>t
11a0: 68 75 6e 6b 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e  hunk</i>)</code>
11b0: 3c 2f 68 33 3e 0d 0a 0d 0a 43 72 65 61 74 65 73  </h3>....Creates
11c0: 20 61 20 74 69 6d 65 6f 75 74 20 73 6f 75 72 63   a timeout sourc
11d0: 65 20 74 68 61 74 20 72 75 6e 73 20 74 68 65 20  e that runs the 
11e0: 67 69 76 65 6e 20 70 72 6f 63 65 64 75 72 65 20  given procedure 
11f0: 61 74 20 72 65 67 75 6c 61 72 20 69 6e 74 65 72  at regular inter
1200: 76 61 6c 73 20 69 6e 20 74 68 65 20 3c 74 74 3e  vals in the <tt>
1210: 6d 61 69 6e 2d 6c 6f 6f 70 2d 63 6f 6e 74 65 78  main-loop-contex
1220: 74 3c 2f 74 74 3e 2e 20 54 68 65 20 69 6e 74 65  t</tt>. The inte
1230: 72 76 61 6c 20 69 73 20 73 70 65 63 69 66 69 65  rval is specifie
1240: 64 20 69 6e 20 73 65 63 6f 6e 64 73 2e 20 49 66  d in seconds. If
1250: 20 74 68 65 20 69 6e 74 65 72 76 61 6c 20 69 73   the interval is
1260: 20 61 6e 20 65 78 61 63 74 20 69 6e 74 65 67 65   an exact intege
1270: 72 2c 20 74 68 65 20 73 6f 75 72 63 65 20 77 69  r, the source wi
1280: 6c 6c 20 68 61 76 65 20 73 65 63 6f 6e 64 20 67  ll have second g
1290: 72 61 6e 75 6c 61 72 69 74 79 2c 20 6f 74 68 65  ranularity, othe
12a0: 72 77 69 73 65 20 69 74 20 77 69 6c 6c 20 68 61  rwise it will ha
12b0: 76 65 20 6d 69 6c 6c 69 73 65 63 6f 6e 64 20 67  ve millisecond g
12c0: 72 61 6e 75 6c 61 72 69 74 79 2e 20 54 68 65 20  ranularity. The 
12d0: 73 6f 75 72 63 65 20 6b 65 65 70 73 20 69 6e 76  source keeps inv
12e0: 6f 6b 69 6e 67 20 74 68 65 20 63 61 6c 6c 62 61  oking the callba
12f0: 63 6b 20 69 6e 20 72 65 67 75 6c 61 72 20 69 6e  ck in regular in
1300: 74 65 72 76 61 6c 73 20 61 73 20 6c 6f 6e 67 20  tervals as long 
1310: 61 73 20 74 68 65 20 6d 61 69 6e 20 6c 6f 6f 70  as the main loop
1320: 20 6b 65 65 70 73 20 72 75 6e 6e 69 6e 67 20 61   keeps running a
1330: 6e 64 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20  nd the callback 
1340: 6b 65 65 70 73 20 72 65 74 75 72 6e 69 6e 67 20  keeps returning 
1350: 74 72 75 65 20 76 61 6c 75 65 73 2e 20 4f 6e 63  true values. Onc
1360: 65 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 72  e the callback r
1370: 65 74 75 72 6e 73 20 3c 74 74 3e 23 66 3c 2f 74  eturns <tt>#f</t
1380: 74 3e 2c 20 74 68 65 20 73 6f 75 72 63 65 20 72  t>, the source r
1390: 65 6d 6f 76 65 73 20 69 74 73 65 6c 66 20 66 72  emoves itself fr
13a0: 6f 6d 20 69 74 73 20 6d 61 69 6e 20 63 6f 6e 74  om its main cont
13b0: 65 78 74 2e 20 54 68 65 20 70 72 6f 63 65 64 75  ext. The procedu
13c0: 72 65 20 72 65 74 75 72 6e 73 20 74 68 65 20 69  re returns the i
13d0: 64 65 6e 74 69 66 69 65 72 20 6f 66 20 74 68 65  dentifier of the
13e0: 20 6e 65 77 20 73 6f 75 72 63 65 2e 0d 0a 0d 0a   new source.....
13f0: 3c 68 32 3e 4f 62 6a 65 63 74 20 4d 61 6e 61 67  <h2>Object Manag
1400: 65 6d 65 6e 74 3c 2f 68 32 3e 0d 0a 0d 0a 3c 68  ement</h2>....<h
1410: 33 3e 66 74 79 70 65 3a 20 3c 63 6f 64 65 3e 6f  3>ftype: <code>o
1420: 62 6a 65 63 74 3c 2f 63 6f 64 65 3e 3c 2f 68 33  bject</code></h3
1430: 3e 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72 65  >..<h3>procedure
1440: 3a 20 3c 63 6f 64 65 3e 28 77 72 61 70 2d 6f 62  : <code>(wrap-ob
1450: 6a 65 63 74 20 3c 69 3e 61 64 64 72 65 73 73 3c  ject <i>address<
1460: 2f 69 3e 20 3c 69 3e 72 65 74 61 69 6e 3f 3c 2f  /i> <i>retain?</
1470: 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d  i>)</code></h3>.
1480: 0a 0d 0a 47 4f 62 6a 65 63 74 20 69 6e 73 74 61  ...GObject insta
1490: 6e 63 65 20 72 65 66 65 72 65 6e 63 65 73 20 61  nce references a
14a0: 72 65 20 72 65 70 72 65 73 65 6e 74 65 64 20 61  re represented a
14b0: 73 20 66 6f 72 65 69 67 6e 20 70 6f 69 6e 74 65  s foreign pointe
14c0: 72 20 6f 62 6a 65 63 74 73 2e 20 54 68 65 20 72  r objects. The r
14d0: 65 66 65 72 65 6e 63 65 20 63 6f 75 6e 74 20 6f  eference count o
14e0: 66 20 74 68 65 20 6f 62 6a 65 63 74 20 69 73 20  f the object is 
14f0: 69 6e 63 72 65 6d 65 6e 74 65 64 20 62 79 20 3c  incremented by <
1500: 74 74 3e 77 72 61 70 2d 6f 62 6a 65 63 74 3c 2f  tt>wrap-object</
1510: 74 74 3e 20 69 66 20 69 74 73 20 73 65 63 6f 6e  tt> if its secon
1520: 64 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 72  d argument is tr
1530: 75 65 2e 20 3c 74 74 3e 6f 62 6a 65 63 74 2d 63  ue. <tt>object-c
1540: 6f 6c 6c 65 63 74 3c 2f 74 74 3e 20 69 73 20 74  ollect</tt> is t
1550: 68 65 6e 20 63 61 6c 6c 65 64 20 74 6f 20 64 65  hen called to de
1560: 63 72 65 6d 65 6e 74 20 74 68 65 20 72 65 66 65  crement the refe
1570: 72 65 6e 63 65 20 63 6f 75 6e 74 20 6f 66 20 61  rence count of a
1580: 6c 6c 20 6f 62 6a 65 63 74 73 20 74 68 61 74 20  ll objects that 
1590: 68 61 76 65 20 67 6f 6e 65 20 6f 75 74 20 6f 66  have gone out of
15a0: 20 73 63 6f 70 65 2e 20 46 69 6e 61 6c 6c 79 2c   scope. Finally,
15b0: 20 74 68 65 20 6e 65 77 20 70 6f 69 6e 74 65 72   the new pointer
15c0: 20 69 73 20 72 65 67 69 73 74 65 72 65 64 20 77   is registered w
15d0: 69 74 68 20 74 68 65 20 67 75 61 72 64 69 61 6e  ith the guardian
15e0: 20 75 73 65 64 20 62 79 20 3c 74 74 3e 6f 62 6a   used by <tt>obj
15f0: 65 63 74 2d 63 6f 6c 6c 65 63 74 3c 2f 74 74 3e  ect-collect</tt>
1600: 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75  .....<h3>procedu
1610: 72 65 3a 20 3c 63 6f 64 65 3e 28 6f 62 6a 65 63  re: <code>(objec
1620: 74 2d 63 6f 6c 6c 65 63 74 29 3c 2f 63 6f 64 65  t-collect)</code
1630: 3e 3c 2f 68 33 3e 0d 0a 0d 0a 44 65 63 72 65 6d  ></h3>....Decrem
1640: 65 6e 74 73 20 74 68 65 20 72 65 66 65 72 65 6e  ents the referen
1650: 63 65 20 63 6f 75 6e 74 20 6f 66 20 61 6c 6c 20  ce count of all 
1660: 6f 62 6a 65 63 74 73 20 77 68 6f 73 65 20 70 6f  objects whose po
1670: 69 6e 74 65 72 20 77 72 61 70 70 65 72 73 20 68  inter wrappers h
1680: 61 76 65 20 67 6f 6e 65 20 6f 75 74 20 6f 66 20  ave gone out of 
1690: 73 63 6f 70 65 2e 0d 0a 0d 0a 3c 68 33 3e 70 72  scope.....<h3>pr
16a0: 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28  ocedure: <code>(
16b0: 6f 62 6a 65 63 74 3f 20 3c 69 3e 61 6e 79 3c 2f  object? <i>any</
16c0: 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d  i>)</code></h3>.
16d0: 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72 65 3a 20  .<h3>procedure: 
16e0: 3c 63 6f 64 65 3e 28 6f 62 6a 65 63 74 3f 20 3c  <code>(object? <
16f0: 69 3e 61 6e 79 3c 2f 69 3e 20 3c 69 3e 74 79 70  i>any</i> <i>typ
1700: 65 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68  e</i>)</code></h
1710: 33 3e 0d 0a 0d 0a 43 68 65 63 6b 73 20 77 68 65  3>....Checks whe
1720: 74 68 65 72 20 74 68 65 20 67 69 76 65 6e 20 76  ther the given v
1730: 61 6c 75 65 20 69 73 20 61 20 76 61 6c 69 64 20  alue is a valid 
1740: 6f 62 6a 65 63 74 20 70 6f 69 6e 74 65 72 2e 20  object pointer. 
1750: 4f 70 74 69 6f 6e 61 6c 6c 79 20 61 6c 73 6f 20  Optionally also 
1760: 63 68 65 63 6b 20 77 68 65 74 68 65 72 20 74 68  check whether th
1770: 65 20 6f 62 6a 65 63 74 20 69 73 20 6f 66 20 74  e object is of t
1780: 68 65 20 67 69 76 65 6e 20 74 79 70 65 2c 20 72  he given type, r
1790: 65 70 72 65 73 65 6e 74 65 64 20 62 79 20 61 20  epresented by a 
17a0: 47 54 79 70 65 20 69 6e 74 65 67 65 72 20 63 6f  GType integer co
17b0: 64 65 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65  de.....<h3>proce
17c0: 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28 63 68 65  dure: <code>(che
17d0: 63 6b 2d 6f 62 6a 65 63 74 20 3c 69 3e 77 68 6f  ck-object <i>who
17e0: 3c 2f 69 3e 20 3c 69 3e 61 6e 79 3c 2f 69 3e 20  </i> <i>any</i> 
17f0: 3c 69 3e 74 79 70 65 3c 2f 69 3e 29 3c 2f 63 6f  <i>type</i>)</co
1800: 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 43 68 65 63  de></h3>....Chec
1810: 6b 73 20 77 68 65 74 68 65 72 20 74 68 65 20 67  ks whether the g
1820: 69 76 65 6e 20 6f 62 6a 65 63 74 20 69 73 20 61  iven object is a
1830: 20 76 61 6c 69 64 20 47 4f 62 6a 65 63 74 20 69   valid GObject i
1840: 6e 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 67  nstance of the g
1850: 69 76 65 6e 20 47 54 79 70 65 2e 20 49 6e 20 63  iven GType. In c
1860: 61 73 65 20 6f 66 20 73 75 63 63 65 73 73 2c 20  ase of success, 
1870: 74 68 65 20 6f 62 6a 65 63 74 20 69 73 20 72 65  the object is re
1880: 74 75 72 6e 65 64 2e 20 49 66 20 74 68 65 20 63  turned. If the c
1890: 68 65 63 6b 20 66 61 69 6c 73 2c 20 61 6e 20 65  heck fails, an e
18a0: 72 72 6f 72 20 69 73 20 72 61 69 73 65 64 2c 20  rror is raised, 
18b0: 77 68 69 63 68 20 69 6e 63 6c 75 64 65 73 20 61  which includes a
18c0: 20 3c 74 74 3e 26 77 68 6f 3c 2f 74 74 3e 20 63   <tt>&who</tt> c
18d0: 6f 6e 64 69 74 69 6f 6e 20 77 69 74 68 20 74 68  ondition with th
18e0: 65 20 67 69 76 65 6e 20 6c 6f 63 61 74 69 6f 6e  e given location
18f0: 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e 2e 0d   specification..
1900: 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72 65  ...<h3>procedure
1910: 3a 20 3c 63 6f 64 65 3e 28 6d 61 6b 65 2d 6f 62  : <code>(make-ob
1920: 6a 65 63 74 20 3c 69 3e 74 79 70 65 3c 2f 69 3e  ject <i>type</i>
1930: 20 7b 3c 69 3e 6e 61 6d 65 3c 2f 69 3e 20 3c 69   {<i>name</i> <i
1940: 3e 74 79 70 65 3c 2f 69 3e 20 3c 69 3e 76 3c 2f  >type</i> <i>v</
1950: 69 3e 7d 20 2e 2e 2e 29 3c 2f 63 6f 64 65 3e 3c  i>} ...)</code><
1960: 2f 68 33 3e 0d 0a 0d 0a 43 72 65 61 74 65 73 20  /h3>....Creates 
1970: 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74  an instance of t
1980: 68 65 20 67 69 76 65 6e 20 47 4f 62 6a 65 63 74  he given GObject
1990: 20 74 79 70 65 20 77 69 74 68 20 74 68 65 20 67   type with the g
19a0: 69 76 65 6e 20 63 6f 6e 73 74 72 75 63 74 69 6f  iven constructio
19b0: 6e 20 70 72 6f 70 65 72 74 69 65 73 2e 20 45 61  n properties. Ea
19c0: 63 68 20 70 72 6f 70 65 72 74 79 20 69 73 20 73  ch property is s
19d0: 70 65 63 69 66 69 65 64 20 61 73 20 61 20 74 68  pecified as a th
19e0: 72 65 65 20 61 72 67 75 6d 65 6e 74 73 2c 20 69  ree arguments, i
19f0: 6e 64 69 63 61 74 69 6e 67 20 69 74 73 20 6e 61  ndicating its na
1a00: 6d 65 2c 20 74 79 70 65 20 61 6e 64 20 76 61 6c  me, type and val
1a10: 75 65 2e 0d 0a 0d 0a 54 68 65 20 74 79 70 65 20  ue.....The type 
1a20: 6f 66 20 65 61 63 68 20 63 6f 6e 73 74 72 75 63  of each construc
1a30: 74 69 6f 6e 20 70 72 6f 70 65 72 74 79 20 69 73  tion property is
1a40: 20 69 6e 64 69 63 61 74 65 64 20 62 79 20 61 20   indicated by a 
1a50: 73 79 6d 62 6f 6c 3a 0d 0a 0d 0a 20 20 2a 20 20  symbol:....  *  
1a60: 3c 74 74 3e 69 6e 74 65 67 65 72 2d 38 3c 2f 74  <tt>integer-8</t
1a70: 74 3e 2c 20 3c 74 74 3e 67 63 68 61 72 3c 2f 74  t>, <tt>gchar</t
1a80: 74 3e 3a 20 53 69 67 6e 65 64 20 38 2d 62 69 74  t>: Signed 8-bit
1a90: 20 69 6e 74 65 67 65 72 0d 0a 20 20 2a 20 20 3c   integer..  *  <
1aa0: 74 74 3e 75 6e 73 69 67 6e 65 64 2d 38 3c 2f 74  tt>unsigned-8</t
1ab0: 74 3e 2c 20 3c 74 74 3e 67 75 63 68 61 72 3c 2f  t>, <tt>guchar</
1ac0: 74 74 3e 3a 20 55 6e 73 69 67 6e 65 64 20 38 2d  tt>: Unsigned 8-
1ad0: 62 69 74 20 69 6e 74 65 67 65 72 0d 0a 20 20 2a  bit integer..  *
1ae0: 20 20 3c 74 74 3e 62 6f 6f 6c 65 61 6e 3c 2f 74    <tt>boolean</t
1af0: 74 3e 2c 20 3c 74 74 3e 67 62 6f 6f 6c 65 61 6e  t>, <tt>gboolean
1b00: 3c 2f 74 74 3e 3a 20 42 6f 6f 6c 65 61 6e 0d 0a  </tt>: Boolean..
1b10: 20 20 2a 20 20 3c 74 74 3e 69 6e 74 3c 2f 74 74    *  <tt>int</tt
1b20: 3e 2c 20 3c 74 74 3e 67 69 6e 74 3c 2f 74 74 3e  >, <tt>gint</tt>
1b30: 3a 20 53 69 67 6e 65 64 20 6e 61 74 69 76 65 20  : Signed native 
1b40: 69 6e 74 65 67 65 72 0d 0a 20 20 2a 20 20 3c 74  integer..  *  <t
1b50: 74 3e 75 6e 73 69 67 6e 65 64 2d 69 6e 74 3c 2f  t>unsigned-int</
1b60: 74 74 3e 2c 20 3c 74 74 3e 75 6e 73 69 67 6e 65  tt>, <tt>unsigne
1b70: 64 3c 2f 74 74 3e 2c 20 3c 74 74 3e 67 75 69 6e  d</tt>, <tt>guin
1b80: 74 3c 2f 74 74 3e 3a 20 55 6e 73 69 67 6e 65 64  t</tt>: Unsigned
1b90: 20 6e 61 74 69 76 65 20 69 6e 74 65 67 65 72 0d   native integer.
1ba0: 0a 20 20 2a 20 20 3c 74 74 3e 6c 6f 6e 67 3c 2f  .  *  <tt>long</
1bb0: 74 74 3e 2c 20 3c 74 74 3e 67 6c 6f 6e 67 3c 2f  tt>, <tt>glong</
1bc0: 74 74 3e 3a 20 53 69 67 6e 65 64 20 6e 61 74 69  tt>: Signed nati
1bd0: 76 65 20 6c 6f 6e 67 20 69 6e 74 65 67 65 72 0d  ve long integer.
1be0: 0a 20 20 2a 20 20 3c 74 74 3e 75 6e 73 69 67 6e  .  *  <tt>unsign
1bf0: 65 64 2d 6c 6f 6e 67 3c 2f 74 74 3e 2c 20 3c 74  ed-long</tt>, <t
1c00: 74 3e 67 75 6c 6f 6e 67 3c 2f 74 74 3e 3a 20 55  t>gulong</tt>: U
1c10: 6e 73 69 67 6e 65 64 20 6e 61 74 69 76 65 20 6c  nsigned native l
1c20: 6f 6e 67 20 69 6e 74 65 67 65 72 0d 0a 20 20 2a  ong integer..  *
1c30: 20 20 3c 74 74 3e 69 6e 74 65 67 65 72 2d 36 34    <tt>integer-64
1c40: 3c 2f 74 74 3e 2c 20 3c 74 74 3e 67 69 6e 74 36  </tt>, <tt>gint6
1c50: 34 3c 2f 74 74 3e 3a 20 53 69 67 6e 65 64 20 36  4</tt>: Signed 6
1c60: 34 2d 62 69 74 20 69 6e 74 65 67 65 72 0d 0a 20  4-bit integer.. 
1c70: 20 2a 20 20 3c 74 74 3e 75 6e 73 69 67 6e 65 64   *  <tt>unsigned
1c80: 2d 36 34 3c 2f 74 74 3e 2c 20 3c 74 74 3e 67 75  -64</tt>, <tt>gu
1c90: 69 6e 74 36 34 3c 2f 74 74 3e 3a 20 55 6e 73 69  int64</tt>: Unsi
1ca0: 67 6e 65 64 20 36 34 2d 62 69 74 20 69 6e 74 65  gned 64-bit inte
1cb0: 67 65 72 0d 0a 20 20 2a 20 20 3c 74 74 3e 66 6c  ger..  *  <tt>fl
1cc0: 6f 61 74 3c 2f 74 74 3e 2c 20 3c 74 74 3e 67 66  oat</tt>, <tt>gf
1cd0: 6c 6f 61 74 3c 2f 74 74 3e 3a 20 33 32 2d 62 69  loat</tt>: 32-bi
1ce0: 74 20 66 6c 6f 61 74 69 6e 67 20 70 6f 69 6e 74  t floating point
1cf0: 20 6e 75 6d 62 65 72 0d 0a 20 20 2a 20 20 3c 74   number..  *  <t
1d00: 74 3e 64 6f 75 62 6c 65 3c 2f 74 74 3e 2c 20 3c  t>double</tt>, <
1d10: 74 74 3e 67 64 6f 75 62 6c 65 3c 2f 74 74 3e 3a  tt>gdouble</tt>:
1d20: 20 36 34 2d 62 69 74 20 66 6c 6f 61 74 69 6e 67   64-bit floating
1d30: 20 70 6f 69 6e 74 20 6e 75 6d 62 65 72 0d 0a 20   point number.. 
1d40: 20 2a 20 20 3c 74 74 3e 75 74 66 2d 38 3c 2f 74   *  <tt>utf-8</t
1d50: 74 3e 2c 20 3c 74 74 3e 73 74 72 69 6e 67 3c 2f  t>, <tt>string</
1d60: 74 74 3e 2c 20 3c 74 74 3e 67 63 68 61 72 2a 3c  tt>, <tt>gchar*<
1d70: 2f 74 74 3e 2c 20 3c 74 74 3e 67 63 68 61 72 61  /tt>, <tt>gchara
1d80: 72 72 61 79 3c 2f 74 74 3e 3a 20 55 54 46 2d 38  rray</tt>: UTF-8
1d90: 20 65 6e 63 6f 64 65 64 20 73 74 72 69 6e 67 0d   encoded string.
1da0: 0a 20 20 2a 20 20 3c 74 74 3e 76 6f 69 64 2a 3c  .  *  <tt>void*<
1db0: 2f 74 74 3e 2c 20 3c 74 74 3e 75 70 74 72 3c 2f  /tt>, <tt>uptr</
1dc0: 74 74 3e 2c 20 3c 74 74 3e 67 70 6f 69 6e 74 65  tt>, <tt>gpointe
1dd0: 72 3c 2f 74 74 3e 3a 20 55 6e 73 69 67 6e 65 64  r</tt>: Unsigned
1de0: 20 6e 61 74 69 76 65 20 6d 65 6d 6f 72 79 20 61   native memory a
1df0: 64 64 72 65 73 73 0d 0a 20 20 2a 20 20 3c 74 74  ddress..  *  <tt
1e00: 3e 6f 62 6a 65 63 74 3c 2f 74 74 3e 2c 20 3c 74  >object</tt>, <t
1e10: 74 3e 47 4f 62 6a 65 63 74 3c 2f 74 74 3e 3a 20  t>GObject</tt>: 
1e20: 57 72 61 70 70 65 64 20 47 4f 62 6a 65 63 74 20  Wrapped GObject 
1e30: 69 6e 73 74 61 6e 63 65 0d 0a 20 20 2a 20 20 3c  instance..  *  <
1e40: 74 74 3e 74 79 70 65 3c 2f 74 74 3e 2c 20 3c 74  tt>type</tt>, <t
1e50: 74 3e 47 54 79 70 65 3c 2f 74 74 3e 3a 20 47 54  t>GType</tt>: GT
1e60: 79 70 65 20 63 6f 64 65 0d 0a 0d 0a 49 6e 20 61  ype code....In a
1e70: 64 64 69 74 69 6f 6e 2c 20 74 68 65 20 74 79 70  ddition, the typ
1e80: 65 20 6d 61 79 20 62 65 20 61 20 47 54 79 70 65  e may be a GType
1e90: 20 63 6f 64 65 20 72 65 70 72 65 73 65 6e 74 69   code representi
1ea0: 6e 67 20 6f 6e 65 20 6f 66 20 74 68 65 20 61 62  ng one of the ab
1eb0: 6f 76 65 20 74 79 70 65 73 20 6f 72 20 61 20 73  ove types or a s
1ec0: 75 62 74 79 70 65 20 6f 66 20 47 4f 62 6a 65 63  ubtype of GObjec
1ed0: 74 20 6f 72 20 47 42 6f 78 65 64 2e 0d 0a 0d 0a  t or GBoxed.....
1ee0: 4f 62 6a 65 63 74 20 69 6e 73 74 61 6e 63 65 73  Object instances
1ef0: 20 72 65 74 75 72 6e 65 64 20 62 79 20 3c 74 74   returned by <tt
1f00: 3e 6d 61 6b 65 2d 6f 62 6a 65 63 74 3c 2f 74 74  >make-object</tt
1f10: 3e 20 68 61 76 65 20 74 6f 20 62 65 20 72 65 6c  > have to be rel
1f20: 65 61 73 65 64 20 75 73 69 6e 67 20 3c 74 74 3e  eased using <tt>
1f30: 6f 62 6a 65 63 74 2d 72 65 6c 65 61 73 65 21 3c  object-release!<
1f40: 2f 74 74 3e 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f  /tt>.....<h3>pro
1f50: 63 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28 6f  cedure: <code>(o
1f60: 62 6a 65 63 74 2d 74 79 70 65 20 3c 69 3e 6f 62  bject-type <i>ob
1f70: 6a 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68  j</i>)</code></h
1f80: 33 3e 0d 0a 0d 0a 52 65 74 72 69 65 76 65 73 20  3>....Retrieves 
1f90: 74 68 65 20 47 54 79 70 65 20 63 6f 64 65 20 66  the GType code f
1fa0: 6f 72 20 74 68 65 20 63 6c 61 73 73 20 6f 66 20  or the class of 
1fb0: 74 68 65 20 67 69 76 65 6e 20 6f 62 6a 65 63 74  the given object
1fc0: 20 69 6e 73 74 61 6e 63 65 2e 0d 0a 0d 0a 3c 68   instance.....<h
1fd0: 33 3e 70 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f  3>procedure: <co
1fe0: 64 65 3e 28 6f 62 6a 65 63 74 2d 72 65 66 20 3c  de>(object-ref <
1ff0: 69 3e 6f 62 6a 3c 2f 69 3e 20 3c 69 3e 6e 61 6d  i>obj</i> <i>nam
2000: 65 3c 2f 69 3e 20 3c 69 3e 74 79 70 65 3c 2f 69  e</i> <i>type</i
2010: 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a  >)</code></h3>..
2020: 3c 68 33 3e 70 72 6f 63 65 64 75 72 65 3a 20 3c  <h3>procedure: <
2030: 63 6f 64 65 3e 28 6f 62 6a 65 63 74 2d 72 65 66  code>(object-ref
2040: 20 3c 69 3e 6f 62 6a 3c 2f 69 3e 20 3c 69 3e 6e   <i>obj</i> <i>n
2050: 61 6d 65 3c 2f 69 3e 20 3c 69 3e 74 79 70 65 3c  ame</i> <i>type<
2060: 2f 69 3e 20 3c 69 3e 63 6f 6e 76 65 72 74 3c 2f  /i> <i>convert</
2070: 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d  i>)</code></h3>.
2080: 0a 0d 0a 52 65 74 72 69 65 76 65 73 20 74 68 65  ...Retrieves the
2090: 20 76 61 6c 75 65 20 6f 66 20 61 20 6e 61 6d 65   value of a name
20a0: 64 20 70 72 6f 70 65 72 74 79 20 6f 66 20 74 68  d property of th
20b0: 65 20 67 69 76 65 6e 20 6f 62 6a 65 63 74 2e 20  e given object. 
20c0: 4f 70 74 69 6f 6e 61 6c 6c 79 2c 20 74 68 65 20  Optionally, the 
20d0: 76 61 6c 75 65 20 69 73 20 63 6f 6e 76 65 72 74  value is convert
20e0: 65 64 20 75 73 69 6e 67 20 74 68 65 20 73 70 65  ed using the spe
20f0: 63 69 66 69 65 64 20 70 72 6f 63 65 64 75 72 65  cified procedure
2100: 20 62 65 66 6f 72 65 20 69 74 20 69 73 20 72 65   before it is re
2110: 74 75 72 6e 65 64 2e 20 54 68 69 73 20 69 73 20  turned. This is 
2120: 70 61 72 74 69 63 75 6c 61 72 6c 79 20 75 73 65  particularly use
2130: 66 75 6c 20 66 6f 72 20 69 6e 73 74 61 6e 63 65  ful for instance
2140: 73 20 6f 66 20 62 6f 78 65 64 20 76 61 6c 75 65  s of boxed value
2150: 73 20 74 68 61 74 20 62 65 63 6f 6d 65 20 69 6e  s that become in
2160: 76 61 6c 69 64 20 62 65 66 6f 72 65 20 3c 74 74  valid before <tt
2170: 3e 6f 62 6a 65 63 74 2d 72 65 66 3c 2f 74 74 3e  >object-ref</tt>
2180: 20 72 65 74 75 72 6e 73 2e 0d 0a 0d 0a 4f 62 6a   returns.....Obj
2190: 65 63 74 20 69 6e 73 74 61 6e 63 65 73 20 72 65  ect instances re
21a0: 74 75 72 6e 65 64 20 62 79 20 3c 74 74 3e 6f 62  turned by <tt>ob
21b0: 6a 65 63 74 2d 72 65 66 3c 2f 74 74 3e 20 68 61  ject-ref</tt> ha
21c0: 76 65 20 74 6f 20 62 65 20 72 65 6c 65 61 73 65  ve to be release
21d0: 64 20 75 73 69 6e 67 20 3c 74 74 3e 6f 62 6a 65  d using <tt>obje
21e0: 63 74 2d 72 65 6c 65 61 73 65 21 3c 2f 74 74 3e  ct-release!</tt>
21f0: 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75  .....<h3>procedu
2200: 72 65 3a 20 3c 63 6f 64 65 3e 28 6f 62 6a 65 63  re: <code>(objec
2210: 74 2d 73 65 74 21 20 3c 69 3e 6f 62 6a 3c 2f 69  t-set! <i>obj</i
2220: 3e 20 3c 69 3e 6e 61 6d 65 3c 2f 69 3e 20 3c 69  > <i>name</i> <i
2230: 3e 74 79 70 65 3c 2f 69 3e 20 3c 69 3e 76 3c 2f  >type</i> <i>v</
2240: 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d  i>)</code></h3>.
2250: 0a 0d 0a 53 65 74 73 20 74 68 65 20 76 61 6c 75  ...Sets the valu
2260: 65 20 6f 66 20 61 20 6e 61 6d 65 64 20 70 72 6f  e of a named pro
2270: 70 65 72 74 79 20 6f 66 20 74 68 65 20 67 69 76  perty of the giv
2280: 65 6e 20 6f 62 6a 65 63 74 2e 20 54 68 65 20 74  en object. The t
2290: 79 70 65 20 6f 66 20 74 68 65 20 76 61 6c 75 65  ype of the value
22a0: 20 74 6f 20 73 65 74 20 69 73 20 69 6e 64 69 63   to set is indic
22b0: 61 74 65 64 20 62 79 20 61 20 73 79 6d 62 6f 6c  ated by a symbol
22c0: 2c 20 74 68 65 20 73 61 6d 65 20 61 73 20 66 6f  , the same as fo
22d0: 72 20 3c 74 74 3e 6f 62 6a 65 63 74 2d 72 65 66  r <tt>object-ref
22e0: 3c 2f 74 74 3e 2e 0d 0a 0d 0a 3c 68 33 3e 70 72  </tt>.....<h3>pr
22f0: 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28  ocedure: <code>(
2300: 73 69 67 6e 61 6c 2d 68 61 6e 64 6c 65 72 20 3c  signal-handler <
2310: 69 3e 6f 62 6a 3c 2f 69 3e 20 3c 69 3e 73 69 67  i>obj</i> <i>sig
2320: 6e 61 6c 3c 2f 69 3e 20 3c 69 3e 70 72 6f 63 3c  nal</i> <i>proc<
2330: 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e  /i>)</code></h3>
2340: 0d 0a 0d 0a 43 6f 6e 6e 65 63 74 73 20 61 20 68  ....Connects a h
2350: 61 6e 64 6c 65 72 20 74 6f 20 61 20 73 69 67 6e  andler to a sign
2360: 61 6c 20 61 6e 64 20 72 65 74 75 72 6e 73 20 61  al and returns a
2370: 20 6e 75 6d 65 72 69 63 20 69 64 65 6e 74 69 66   numeric identif
2380: 69 65 72 2e 20 54 68 65 20 73 69 67 6e 61 6c 20  ier. The signal 
2390: 69 73 20 73 70 65 63 69 66 69 65 64 20 61 73 20  is specified as 
23a0: 61 20 73 74 72 69 6e 67 2c 20 77 68 69 63 68 20  a string, which 
23b0: 69 6e 63 6c 75 64 65 73 20 74 68 65 20 73 69 67  includes the sig
23c0: 6e 61 6c 20 6e 61 6d 65 20 61 6e 64 20 6f 70 74  nal name and opt
23d0: 69 6f 6e 61 6c 20 64 65 74 61 69 6c 73 2e 20 54  ional details. T
23e0: 68 65 20 63 61 6c 6c 62 61 63 6b 20 70 72 6f 63  he callback proc
23f0: 65 64 75 72 65 20 77 69 6c 6c 20 62 65 20 6c 6f  edure will be lo
2400: 63 6b 65 64 20 69 6e 20 6d 65 6d 6f 72 79 20 61  cked in memory a
2410: 73 20 6c 6f 6e 67 20 61 73 20 74 68 65 20 73 69  s long as the si
2420: 67 6e 61 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 20  gnal connection 
2430: 69 73 20 6d 61 69 6e 74 61 69 6e 65 64 2e 0d 0a  is maintained...
2440: 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72 65 3a  ..<h3>procedure:
2450: 20 3c 63 6f 64 65 3e 28 73 69 67 6e 61 6c 2d 64   <code>(signal-d
2460: 69 73 63 6f 6e 6e 65 63 74 21 20 3c 69 3e 6f 62  isconnect! <i>ob
2470: 6a 3c 2f 69 3e 20 3c 69 3e 69 6e 74 65 67 65 72  j</i> <i>integer
2480: 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33  </i>)</code></h3
2490: 3e 0d 0a 0d 0a 44 69 73 63 6f 6e 6e 65 63 74 73  >....Disconnects
24a0: 20 74 68 65 20 68 61 6e 64 6c 65 72 20 77 69 74   the handler wit
24b0: 68 20 74 68 65 20 67 69 76 65 6e 20 6e 75 6d 65  h the given nume
24c0: 72 69 63 20 69 64 65 6e 74 69 66 69 65 72 20 66  ric identifier f
24d0: 72 6f 6d 20 69 74 73 20 73 69 67 6e 61 6c 2e 0d  rom its signal..
24e0: 0a 0a 5a 20 61 30 63 65 66 37 35 30 34 63 63 32  ..Z a0cef7504cc2
24f0: 39 30 31 38 30 34 63 37 38 36 33 35 36 63 35 62  901804c786356c5b
2500: 34 63 31 32 0a                                   4c12.