Re: [Java-gnome-developer] Webkit
Brought to you by:
afcowie
From: Niranjan R. <nh...@gm...> - 2012-10-15 19:28:15
|
Greetings again. I have posted my generated code at https://github.com/nhrdl/GirToGnomeJava This is simple maven project. After you compile the project, just run the jar file. It accepts two parameters - name of GIR file and output directory. I have not modified any of the java gnome sources. Rather I am using the existing infrastructure by feeding new files. My generator, currently generates the "defs" file and corresponding bindings in src/bindings directory. You can execute the make command after running generator to compile the sources. If everything goes well, you should get just one compiler error in the generated c code. Currently we generate only constructor in the src/binding directory. Constructors are generated properly and code should compile. Generated defs files are proper and do have all the method information. So executing make command should generate proper bindings and all the methods are available. My current approach is to add functions I need to use in src/bindings directory. However this can be completely automated and I should be able to generate (mostly) proper bindings given some more time. After fixing the minor compiler error in the generated C code (please refer to readme.md), you should be able to use webkit in your java/gtk applications - though not very useful in its default state as "loadUri" method for WebVeiw is not generated and there is no way to tell it. You can fix it by adding following method in the WebView class public void loadUri(String string) { ready = false; WebKitWebView.loadUri(this, string); } Regards, Niranjan On 10/14/2012 03:38 PM, Andrew Cowie wrote: > On Wed, 2012-10-10 at 09:22 -0700, Niranjan Rao wrote: >> 1. Do we want webkit to be part of main library. > Sure! That would be terrific! > >> I understand that not everyone needs webkit and right now current >> mechanism needs webkit libraries to build. > Yes, that is unfortunate. I ran into this 7 year ago; then the question > was gtkmozembed bindings in java-gnome 2.x > >> 2. Is it possible to split java gnome libraries per module - e.g. >> glib.jar, gtk.jar, webkit.jar with version numbers. > Guillaume kindly linked to a discussion on the topic. It *is* a piece of > engineering we should do. > > It actually turns out that we *don't* need multiple .jar files (what a > pain) but we *do* need to split the .so into multiple pieces, loaded on > demand if the developer loads a class that causes the respective > Plumbing to be loaded and have its static initializer block run > > >> I would like to submit my changes upstream after polishing and making >> sure its really submittable or make it available from other channel. > Changes welcome. > > We do enforce a fairly high standard of code hygiene in java-gnome, but > if you follow the existing style you won't have any problems in the > slightest. > > Slightly more subjective is ensuring changes makes sense in the context > of the overall architecture of the library. > > Finally, if you're working on code generation then I'd definitely > welcome Serkan and Vreixo having a look at your code, as they've done > the most recent work in this regard. > > If you were able to join #java-gnome on gimpnet we can have a more > focused chat about it. I look forward to meeting you. > > AfC > Sydney > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > > > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer |