Hi Christoffer, On 16.07.11 03:40, Christoffer Öjeling wrote: > I implemented the function I needed. ( > https://github.com/Cadynum/Apelsin/blob/master/src/GtkExts.hs ) > This was the first time I used the FFI, it looks fairly > straightforward although I had no idea if "safe" or "unsafe" should be > used. > If you want i can create the remaining functions. > You should download the source code (cabal get gtk2hs-buildtools; cabal get gtk) and then modify the Entry.chs module. In particular you must use the c2hs notation to bind functions as only that ensures that modifications in the C source lead to compile time failures. It's also simplifying the code a lot since you don't have to write the "foreign import" clause. Look at the Entry.chs module, then you see what I mean. Cheers, Axel
> Christoffer > > On Fri, Jul 15, 2011 at 10:18 AM, Axel Simon<axel.si...@in.tum.de> wrote: >> Hi Christoffer, >> >> On 15.07.2011, at 00:32, Christoffer Öjeling wrote: >> >>> Hi, >>> The functions introduced in gtk 2.16 for adding icons to a text entry >>> seems to be missing. >>> >>> http://developer.gnome.org/gtk/2.24/GtkEntry.html#gtk-entry-set-icon-from-stock >>> The signals to connect the icons are there though, entryIconPress and >>> entryIconRelease. >>> Could this be added? >>> >> Yes, in principle. I think our code generator is not cool enough for 2.16, >> though, which means we'd have to write the code by hand. If it's a specific >> function you need, I can write it for you. Or you can write them and I apply >> your patch. >> >> The bindings should be straightforward except for: >> - NULL pointers in: use Maybe >> - NULL in return values that are objects: use "maybeNull marshal genPtr" >> where marhsal is the constructor function (mkPixbuf) and genPtr is the >> foreign call returning a pointer >> - GObjects that are returned (e.g. Pixbufs): use makeGObject >> >> Cheers, >> Axel >> >> >>> Thanks, >>> Christoffer >>> >>> >>> ------------------------------------------------------------------------------ >>> AppSumo Presents a FREE Video for the SourceForge Community by Eric >>> Ries, the creator of the Lean Startup Methodology on "Lean Startup >>> Secrets Revealed." This video shows you how to validate your ideas, >>> optimize your ideas and identify your business strategy. >>> http://p.sf.net/sfu/appsumosfdev2dev >>> _______________________________________________ >>> Gtk2hs-users mailing list >>> gtk2hs-us...@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gtk2hs-users >> > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Gtk2hs-users mailing list > gtk2hs-us...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gtk2hs-users ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Gtk2hs-devel mailing list Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel