Hi Damian,<br>Using Maemo input methods without using GTK is possible.<br>Everything works via XMessages. So you have to add the capability to your application to send and read these XMessages.<br><br>You can learn more about HIM following this link:<br>
<a href="http://live.gnome.org/Hildon/HildonInputMethod/Concepts">http://live.gnome.org/Hildon/HildonInputMethod/Concepts</a><br><br>Check this if you want to have a look about the changes done in order to add the HIM in Qt.<br>
<a href="https://garage.maemo.org/plugins/scmsvn/viewcvs.php?view=rev&root=qt4&revision=305">https://garage.maemo.org/plugins/scmsvn/viewcvs.php?view=rev&root=qt4&revision=305</a><br><br>Basically the QApplication_x11 class filters the XMessages, then send them to the input context. <br>
The input Context class has 2 filter functions, the first one filters the XEvent sent by the Hardware keyboard and the second one filters the XMessages sent from the Hildon Main UI (the window that pops up on the botttom of the screen that shows the Virtual Keyboard or other IM Plugins).<br>
<br>Antonio<br><br><br><div class="gmail_quote">On Mon, Jan 19, 2009 at 11:02 PM, Damian Frank <span dir="ltr"><<a href="mailto:damianf@curl.com" target="_blank">damianf@curl.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for the quick reply!<br>
<br>
On Mon, 19 Jan 2009 12:29:35 -0600, Ville M. Vainio <<a href="mailto:vivainio@gmail.com" target="_blank">vivainio@gmail.com</a>><br>
wrote:<br>
<div><br>
> On Mon, Jan 19, 2009 at 7:15 PM, Damian Frank <<a href="mailto:damianf@curl.com" target="_blank">damianf@curl.com</a>> wrote:<br>
>> Hi! I'm working on porting an existing xlib-based application to the<br>
>> Maemo<br>
>> platform. I'm trying to understand whether keeping xlib is a feasible<br>
>> option. (I know very little about GTK development.)<br>
><br>
> This sounded so psychedelic that I just had to look it up. Did you<br>
> already check out GtkSocket / GtkPlug? Perhaps it could be possible to<br>
> embed the hard-to-port part as a widget for otherwise-gtk application?<br>
<br>
</div>Psychedelic? Oh dear, that's almost never an endorsement of a programming<br>
idea... :-)<br>
<br>
I checked out GtkSocket/Plug just now. It seems like an interesting idea,<br>
but unless I'm mistaken, both sides still need to be using GTK since<br>
GtkPlug is just an implementation of GtkWindow. So I don't think that<br>
removes the underlying problem, the worst of which is probably event<br>
handling.<br>
<div><br>
<br>
> Also, did you explore the possibility of porting it to Qt? (since, as<br>
> you said, you are not already familiar with Gtk+). Depending on your<br>
> application, Qt might have something that would allow you to eliminate<br>
> tons (almost all?) of custom gui code. What kind of GUI do you have?<br>
<br>
</div>I think I read somewhere that Qt was considered pretty heavyweight, given<br>
the constraints of the platform. No?<br>
<br>
In any event, it probably wouldn't save us any time over using GTK; we<br>
don't have any custom GUI code that we can do away with, since third<br>
parties depend on the code we use. In any solution, for actual user<br>
interaction we're just going to be drawing and handling raw events. It's<br>
just a question of what host API underlies it; if we can use xlib for it,<br>
then we already have that code written. If not, I have to get my hands<br>
much, much dirtier. Does that make sense?<br>
<br>
Does anyone know about using maemo input methods without GTK? I suspect<br>
that it cannot be done, and that most likely settles the question for us.<br>
But it would be nice to have confirmation.<br>
<br>
--<br>
<font color="#888888">Damian<br>
</font><div><div></div><div>_______________________________________________<br>
maemo-developers mailing list<br>
<a href="mailto:maemo-developers@maemo.org" target="_blank">maemo-developers@maemo.org</a><br>
<a href="https://lists.maemo.org/mailman/listinfo/maemo-developers" target="_blank">https://lists.maemo.org/mailman/listinfo/maemo-developers</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><br>Rita Rudner - "When I eventually met Mr. Right I had no idea that his first name was Always."