[Top][All Lists]

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

[Help-smalltalk] handling Foo ** C callouts

From: Robert Collins
Subject: [Help-smalltalk] handling Foo ** C callouts
Date: Sun, 12 Sep 2004 20:52:21 +1000

Some of the GTK API's have signatures like:

gboolean    gtk_tree_selection_get_selected (GtkTreeSelection
                                             GtkTreeModel **model,
                                             GtkTreeIter *iter);

This is how I have implemented using it:

    modelptr:=GTK.GtkTreeModelPointer new.
    iter:=GTK.GtkTreeIter new.
    (selection getSelected: modelptr iter: iter) ifTrue:
        model:=modelptr model value.
        ... use model.

GtkTreeModelPointer is:
CStruct subclass: #GtkTreeModelPointer
  "FIXME: this should be automatically created, or
  passing #cObjectPtr should be smarter or something"
  declaration: #(
  (#model (#ptr #GtkTreeModel))
  classVariableNames: ''
  poolDictionaries: ''
  category: 'GTK'

It would be nice if the structs.awk file could synthesis types like this
when Foo ** signatures are found.


GPG key available at: <>.

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]