struct _GtkDialog;
struct _GtkEditable;
struct _GtkEntry;
+struct _GtkEntryCompletion;
struct _GtkFrame;
struct _GtkHBox;
struct _GtkHPaned;
};
}
+ extern struct Null {} null;
+
class Object :
public details::Convertible<Object, _GtkObject *, details::Convert::Explicit>,
public details::Convertible<Object, _GTypeInstance *, details::Convert::Explicit> {
#define WRAP(name, super, T, interfaces, ctors, methods) \
class name; \
- class I##name { \
+ class I##name : public details::Convertible<name, T *, details::Convert::Implicit> { \
public: \
using self = name *; \
methods \
}; \
- class name : public super, public details::Convertible<name, T *, details::Convert::Implicit>, public I##name, public details::Mixin<name, void interfaces>::type { \
+ class name : public super, public I##name, public details::Mixin<name, void interfaces>::type { \
public: \
using self = name *; \
using native = T *; \
explicit name(native h) : super(reinterpret_cast<super::native>(h)) {} \
+ explicit name(Null n) : name((native) nullptr) {} \
ctors \
}; \
inline bool operator<(name self, name other) { return self._handle < other._handle; } \
// https://developer.gnome.org/gtk2/stable/ch01.html
+ // GInterface
+
WRAP(CellEditable, Object, _GtkCellEditable, (),
,
);
void editable(bool value);
);
+ WRAP(TreeModel, Object, _GtkTreeModel, (),
+ ,
+ );
+
+ // GObject
+
WRAP(Widget, Object, _GtkWidget, (),
Widget();
,
WRAP(Container, Widget, _GtkContainer, (),
,
+ void add(Widget widget);
);
WRAP(Bin, Container, _GtkBin, (),
,
);
- WRAP(ListStore, Object, _GtkListStore, (),
+ WRAP(EntryCompletion, Object, _GtkEntryCompletion, (),
,
- void clear();
);
- WRAP(TreeModel, Widget, _GtkTreeModel, (),
+ WRAP(ListStore, Object, _GtkListStore, (ITreeModel),
,
+ void clear();
);
+ // GBoxed
+
WRAP(TreePath, Object, _GtkTreePath, (),
TreePath();
TreePath(const char *path);