From 67d9d928147aa59905960480a5d0b4c19c9d1920 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 25 Feb 2010 23:23:53 +0000 Subject: [PATCH] docs: Document the "columns" syntax for ClutterModel Like we do for other classes implementing custom properties, we should document the syntax of the "columns" scriptable property of ClutterModel. --- clutter/clutter-model.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/clutter/clutter-model.c b/clutter/clutter-model.c index 27e0dafe4..7a485f3c3 100644 --- a/clutter/clutter-model.c +++ b/clutter/clutter-model.c @@ -114,6 +114,30 @@ * implementation called #ClutterListModel which has been optimised * for insertion and look up in sorted lists. * + * + * ClutterModel custom properties for #ClutterScript + * #ClutterModel defines a custom property "columns" for #ClutterScript + * which allows defining the column names and types. + * + * Example of the "columns" custom property + * The definition below will create a #ClutterListModel with three + * columns: the first one with name "Name" and containing strings; the + * second one with name "Score" and containing integers; the third one with + * name "Icon" and containing #ClutterTextures. + * + * { + * "type" : "ClutterListModel", + * "id" : "teams-model", + * "columns" : [ + * [ "Name", "gchararray" ], + * [ "Score", "gint" ], + * [ "Icon", "ClutterTexture" ] + * ] + * } + * + * + * + * * #ClutterModel is available since Clutter 0.6 */