From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,558a028f17b42a36 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Bug in GtkAda Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <03e9d0e2-bff2-4450-aa62-6f345cef403b@z2g2000yqm.googlegroups.com> <1hvo3adu70mnu.b4e7ql4yhlp8$.dlg@40tude.net> <27a2a466-27bb-4765-8b15-8c40c3973015@b2g2000yqi.googlegroups.com> Date: Fri, 16 Oct 2009 20:32:29 +0200 Message-ID: <1u1s3pcszobw5.1cmzjrx1xcb8c$.dlg@40tude.net> NNTP-Posting-Date: 16 Oct 2009 20:32:30 CEST NNTP-Posting-Host: 4748c695.newsspool3.arcor-online.net X-Trace: DXC=FXi\6M=o=7WU6b:FjPaGjQMcF=Q^Z^V3X4Fo<]lROoRQ8kFgQTLM9Z[6LHn;2LCV^[ On Fri, 16 Oct 2009 03:20:39 -0700 (PDT), RasikaSrinivasan@gmail.com wrote: > My assumption is -Lc:\gnat\2009\gtkada\lib in the command line pulls > the gtkada library (I suspect there is a pragma in the GtkAda source > somewhere to specify library). (I am including the gtkada.gpr). Yes, you seem to be right. I have looked at the sources, and it is almost certainly a bug. libgtkada.a does not contain _ada_text_attribute_get_appearance (nm does not list it). The problem is that Get_Appearance is a macro, not a library Gtk operation. This is the reason why AdaCore put it into the library, though it could rather place it in the sources. You could implement it yourself looking at the structure GtkTextAttributes. See here: http://library.gnome.org/devel/gtk/stable/GtkTextTag.html#GtkTextAttributes It seems that you could just convert Gtk_Text_Attribute to Gtk_Text_Appearance since both are bare pointers to a prefix of another. E.g. function Get_Appearance (Text_Attr : Gtk_Text_Attributes) return Gtk_Text_Appearance is begin return Gtk_Text_Appearance ((Text_Attr); end Get_Appearance; (I didn't try it) > Anycase, I should look at the syntax coloring example. I think I have > seen your Ada bindings. I will definitely take a look. GtkSourceView comes with a library of language syntax descriptions. Probably your language is already there, e.g. it has Ada. BTW, this one used by GNOME;s gedit, which is based on GtkSourceView. If you need to create yours, there is a how-to: http://library.gnome.org/devel/gtksourceview/stable/lang-tutorial.html I wrote one for the FCL, it wasn't that difficult, despite XML/RegEx suff. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de