Le vendredi 29 octobre 2010 à 23:21 +0200, Andrew Cowie a écrit :
> On Fri, 2010-10-29 at 19:53 +0200, bob wrote:
> > Good news, I successful create a custom CellRenderer in Vala
>
> Um.
>
> You're probably not going to be able to mix java-gnome code and Vala
> code and absolutely not if they use ToggleRefs.
>
> [The GEdit people are going through this right now trying to mix Python
> and JavaScript plugins. It won't work; only one (language) can have a
> ToggleRef to a GObject {shrug}]
Vala isn't an interpreted language like Python or JavaScript, Vala
produce native code like the C language. But I don't know what are
ToggleRef so I can't say if my code is good.
>
> > I create my custom CellRenderer
>
> We had not really gone much further in talking about what you needed.
> Last you said you wanted to subclass Bin. Now you're talking about
> CellRenderer. Which is it?
I need to extends CellRenderer, I try to extends Bin for testing
exclusively (with success). The first custum CellRenderer is for the
"Navigator". I failed to create a good render with two native
TextCellRenderer and PixbufCellRenderer (different height and different
text position in the same tree) so I create a custom CellRenderer and
that's work. I would like to create a second CellRenderer with stars for
rating eBooks in future.
>
> At the GTK Hackfest Vreixo and I talked about some possibilities for how
> to implement a subclassable Bin. We could also do this technique for
> CellRenderer too, though neither of us are hacking on that area right
> now.
I'm waiting for extend CellRenderer (or bin) in pure Java !
>
> > the screenshot
> >
> So back to what you are trying to achieve. In that screenshot all I see
> is what looks to me like something you could do in a TreeView with a
> CellRendererPixbuf and a CellRendererText. What is it that you needed
> custom that we don't have in java-gnome right now? Why not just add 2 ×
> CellRenderer to your TreeViewColumn?
See above I failed to produce the same renderer with 2 CellRenderers.
>
> > I don't know
> > how to link my library with the libgtkjni.so.
>
> You can't. It's not a public library. It has no public symbols, and no
> API or ABI. It's not for linking against.
I know that libgtkjni isn't a public library, but if we couldn't extends
CellRenderer in pure Java, I would like to create native components, but
I can't call the bindings_java_memory_cleanup method in the code below
because it's a libgtkjni function and I'm afraid that cause some
problems with memory.
JNIEXPORT jlong JNICALL
Java_org_gnome_gtk_LibrebookCellRendererNavigator_librebook_1cell_1renderer_1navigator_1new
(JNIEnv * env, jclass cls)
{
LibrebookCellRendererNavigator* result;
jlong _result;
// call function
result = librebook_cell_renderer_navigator_new();
// translate return value to JNI type
_result = (jlong) result;
// cleanup return value
//if (result != NULL) {
// bindings_java_memory_cleanup((GObject*)result, TRUE);
//}
// and finally
return _result;
}
Thanks for you helps and for your great works, I love developing Gnome
application with a good integration in my desktop in Java.
>
> AfC
> Granada
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________ java-gnome-developer mailing
> list [email protected]
> https://lists.sourceforge.net/lists/listinfo/java-gnome-developer
------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware,
phishing sites, and compromised hosts - saving your company time,
money, and embarrassment. Learn More!
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
java-gnome-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/java-gnome-developer