Delivered-To: lablgtk at yquem.inria.fr To: lablgtk at math.nagoya-u.ac.jp From: Dawid Toton Date: Tue, 11 Sep 2007 04:06:33 +0200 Lines: 55 Message-ID: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Lablgtk] Low-level binding questions Content-Type: text/plain; charset=UTF-8; format=flowed Content-Length: 2331 I'm still working on GtkPrintOperation. I have selected some most important questions for C-side of binding. Of course, I could find answers by myself, but I would took too much time. I've already spent several nights on reading LablGTK sources, and I'm really tired. So, forgive me if some of these problems have obvious solutions. :) 5) How is it translated to LablGKT: "GtkPrintOperation implements GtkPrintOperationPreview" GtkPrintOperationPreview is an interface, is special concern needed? 6) The following two objects are not said to be GObject descendants: GtkPageSettings, GtkPageSetup They have mainly setters&getters and really lot of them (but they are not labelled as properties in docs). Can we take advatage of propcc in this case? 15) What classes need their gtk_*_get_type function to be called? All GObject's descendants? Interfaces (like GtkPrintOperationPreview)? 16) When GTK function resturns potiner - have I always check it for null? What macros are intended for that? For example, in ml_gaction.c I read: ML_2 (gtk_action_group_get_action, GtkActionGroup_val, String_val, Val_GAnyObject) Where is the check for null pointer? Will it throw an exception? What should be done in cases, when a function is allowed to return null pointer in certain cases? 17) In ml_gobject.h : CAMLexport value Val_GObject (GObject *); Where is this function defined? I can't find it in LablGTK sources. 18) Is Val_GAnyObject suitable for converting any GObject to OCaml value? Which one style is better: ML_1(gtk_print_context_get_pango_fontmap,GtkPrintContext_val,Val_GAnyObject) ML_1(gtk_print_context_get_pango_fontmap,GtkPrintContext_val,Val_PangoFontMap) ? And what definition of Val_PangoFontMap should be? Maybe just #define Val_PangoFontMap Val_GAnyObject 19) Is it safe to invoke caml_copy_double inside this macro? (I think it should be, but could't found any existing example.) ML_1(gtk_print_context_get_width,GtkPrintContext_val,caml_copy_double) /* is it correct? */ Tkanks in advance. Dawid Toton PS. Poor parts of binding I've currently produced are here: http://www.toton.2-0.pl/OCaml/PrintOperation/ _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk