[maemo-developers] [maemo-developers] VirtualKeyboard service/API
From: Antonio Gomes tonikitoo at gmail.comDate: Mon Jan 30 21:00:04 EET 2006
- Previous message: [maemo-developers] Sources for the pictures viewer
- Next message: [maemo-developers] VirtualKeyboard service/API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Some keys are not recognized, though. Actually, mainly those related to deleting actions (like delete, backspace virtual keyboard keys and so on). As far as I can see/understand, xterm also had to handle them in a proper way, using "vte" [1] for that. Is it ? Is there other GtkIMContext singal to handle actions like these ? [1] http://developer.gnome.org/doc/API/2.0/vte/vteterminal.html#VTETERMINALERASEBINDING regards On 1/28/06, Antonio Gomes <tonikitoo at gmail.com> wrote: > > hey Aaron .. > > just to thank you for your input regarding the Vk stuff ;) > > is works ! (just fixing bugies now) > > cheers > > On 1/24/06, Aaron Levinson <alevinsn at aracnet.com> wrote: > > > > I should note that the "commit" signal, along with the "preedit-changed" > > > > signal, are the only ways that you can respond to input from an input > > method. That's likely your problem--you weren't doing anything with the > > string in the "commit" callback. Writing a proper "commit" callback is > > a > > requirement for using a GTK input method. I wouldn't bother with using > > gdk_window_foreign_new() if this works, and it should work. > > > > Aaron > > > > On Tue, 24 Jan 2006, Antonio Gomes wrote: > > > > > On 1/24/06, Aaron Levinson < alevinsn at aracnet.com> wrote: > > > > > > > > It's unclear to me why you wouldn't be able to "type" anymore in > > HTML > > > > forms. Do you mean with a regular keyboard or with the virtual > > keyboard? > > > > > > > > > > > > it stop working only for the virtual keyboard. Regular kb is ok ! > > > > > > As you indicated in a previous e-mail, you are getting to the "commit" > > > > signal--why don't you just push the string passed to the "commit" > > callback > > > > directly into the form? > > > > > > > > > Hummm ... I got your point here. Good enough to give it a try ;) > > > > > > Look at the source code for GtkSocket or maybe GtkPlug for examples of > > > > using gdk_window_foreign_new(). GtkMozEmbed may use it as well. > > > > > > > > > Ok ... I'll do that now . > > > > > > many thanks again > > > > > > Aaron > > > > > > > > On Tue, 24 Jan 2006, Antonio Gomes wrote: > > > > > > > > > > I still think working with the GtkMozEmbed is the way to go--I > > don't > > > > > > exactly understand your description of the problem that occurred > > when > > > > you > > > > > > used a GtkIMContext with your GtkMozEmbed widget. A more > > detailed > > > > > > description would help. > > > > > > > > > > > > > > > Ok, so let me try: GtkMozEmbed widget wraps some gtk stuff, making > > > > easier > > > > > "embedding" mozilla in a gtk app. It also wraps some mozilla guts > > (like > > > > the > > > > > EmbedPrivate, and listeners - you don't care, probably) and these > > are > > > > left > > > > > alone - I mean, non-gtk widgets. Having said that, the point is: > > "HTML > > > > > forms" are not gtk/gdk objects, so I can not connect im_context to > > them > > > > > without mapping them to gtk object (I'm investigating ways to make > > this > > > > > mapping possible, but I am not sure if it is supported). > > > > > > > > > > In other words, the GtkMozEmbed widget itself seems to be too > > external > > > > for > > > > > my needs, I guess. As soon as set > > > > > > > > > > *gtk_im_context_set_client_window ((GtkIMContext *) > > embed->im_context, > > > > > GDK_WINDOW (widget->window)); > > > > > > > > > > * > > > > > > > > > > I can not longer type into HTML forms ... Now, does it make sense > > to you > > > > ? > > > > > > > > > > > > > > > Why don't you send me the relevant source code > > > > > > that you wrote for GtkMozEmbed? I'll have a chance to look at > > it over > > > > the > > > > > > weekend or possibly on Friday. > > > > > > > > > > > > > > > I will ... thanks for that ;) > > > > > > > > > > Regarding gdk_window_foreign_new, the GdkNativeWindow parameter > > (not > > > > > > GtkNativeWindow as you stated) represents a native window. As > > stated > > > > in > > > > > > the GDK API documentation, this is a Window for X and an HWND > > for > > > > Win32. > > > > > > See > > > > > > > > > > > > > > > > > > http://developer.gnome.org/doc/API/2.0/gdk/gdk-X-Window-System-Interaction.html#gdk-window-foreign-new > > > > > > for more information. I've never used this function and I > > haven't > > > > > > personally tried to use the method that I suggested in my > > original > > > > e-mail. > > > > > > > > > > > > > > > it seems nobody knows much about it :S > > > > > > > > > > regards > > > > > > > > > > > > > > > > > Aaron, > > > > > > > > > > > > > > After some troubles, I'm now reconsidering the idea of > > creating > > > > > > > GdkNativeWindow from the HTML form, and setting the im_context > > to it > > > > > > > (gtk_im_context_set_client_window) - as your proposed first - > > > > instead of > > > > > > > setting it to the GtkMozEmbed widget ! > > > > > > > > > > > > > > But I'm stuck on the gdk_window_foreign_new function. How do I > > use > > > > that > > > > > > ? I > > > > > > > mean, I don't get the GtkNativeWindow parameter required by > > this > > > > > > function > > > > > > > ... Could you help me out here ? > > > > > > > > > > > > > > thanks again ;) > > > > > > > > > > > > > > > > > > > > > On 1/23/06, Antonio Gomes < tonikitoo at gmail.com> wrote: > > > > > > > > > > > > > > > > hi Aaron, > > > > > > > > > > > > > > > > > > > > > > > > > I didn't mention this in my last e-mail, but you'll also > > need to > > > > > > setup a > > > > > > > > > > > > > > > > > > signal handler for the GtkIMContext object's "commit" > > signal. > > > > > > > > > > > > > > > > > > > > > > > > I have it (the 'commit' signal) already connected and also > > its > > > > > > callback > > > > > > > > defined as it is in your post at > > > > > > > > > > > > http://maemo.org/pipermail/maemo-developers/2006-January/002337.html- > > > > > > > > cool !!! ... But problem begins after creating the > > IM_Context > > > > object > > > > > > and > > > > > > > > associating it with the GdkWindow of my GtkMozEmbed object : > > the > > > > > > > > mozilla_engine stop recognizing any input from the vkb, > > except if > > > > I > > > > > > press > > > > > > > > 'backspace' ... > > > > > > > > > > > > > > > > bwt, in 'commit_cb' method, it prints what I type at the > > console > > > > but > > > > > > > > doesn't add nothing at the HTML form (detail: it does with > > no > > > > context > > > > > > > > associated or if I type from the physical keyboard) ... > > > > > > > > > > > > > > > > static gboolean > > > > > > > > gtk_moz_embed_im_context_commit_cb (GtkIMContext *ctx, > > > > const gchar > > > > > > *str, GtkMozEmbed *aEmbed) { > > > > > > > > gunichar uChar = 0; > > > > > > > > guint keyval = 0; > > > > > > > > gchar *text2 = (gchar *) str; > > > > > > > > > > > > > > > > printf ("\n [GTK_MOZ_EMBED] it gets here '%s' > > > > > > > > \n", str); > > > > > > > > > > > > > > > > *// the string is in UTF-8 format--iterate through the > > > > characters* > > > > > > > > *while* (*text2) { > > > > > > > > uChar = g_utf8_get_char(text2); > > > > > > > > keyval = gdk_unicode_to_keyval(uChar); > > > > > > > > > > > > > > > > *//* > > > > > > > > *// do something with the character here* > > > > > > > > *//* > > > > > > > > text2 = g_utf8_next_char(text2); > > > > > > > > } > > > > > > > > } > > > -- --Antonio Gomes http:// tonikitoo (dot) blogspot (dot) com (slash) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20060130/bba360b7/attachment.htm
- Previous message: [maemo-developers] Sources for the pictures viewer
- Next message: [maemo-developers] VirtualKeyboard service/API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]