On Mon, 3 Feb 2003, Angus Leeming wrote:

> 
> Add lots of statements like
>       printf("xoffset = %d\n", sp->xoffset);
> whereever you want to find out what these parameters store. 
> 



Oh, these printf's are my primary tool, for a code-illiterate like me....
Sometimes they help, sometimes they don't, you know!


> 
> In XWorkArea.h you have:
>         FL_OBJECT * work_area;
> so, it's an xforms widget. It knows the form it lives on:
>       work_area->form;
> 


With this "work_area->form", I now have a working XIC for the WorkArea 
events. Precomposition of CJK-characters on the lyx main window is 
perfect. However putting these precomposed characters on the screen with 
your function, "fl_get_composed_string",is not perfect yet. For example, 
suppose I have already put CJK-characters on the lyx main window as,

"XY ZW" (here "X,Y,Z,W" are all CJK-xharacters). Now after these letters 
if I precompose another CJK-character, "P", and then hit "space-bar", I 
get on the screen,

"XY ZW PW" 

That is, I get extra "W" on the screen, which shouldn't be there. 
This happens with the xforms library with your bif xforms.diff patched. to 
debug the situation, I removed all of your patch from the library, except 
the part which contains the fl_get-composed-string,

/* These vars are initialised in do_keyboard.
 *  * They are global vars so that we can make them accessible to the 
outside
 *   * world. CJK users will find them useful.
 *    */

static int kbuflen;
static char keybuf[256];

void fl_get_composed_string(int * ptr_kbuflen, char const ** ptr_keybuf)
{
                printf("len1=%d\n",kbuflen);
                printf("keybuf1=%s\n",keybuf);

                if (!ptr_kbuflen) return;
                 *ptr_kbuflen = kbuflen;
                 *ptr_keybuf = keybuf;
                printf("keybuf2=%s\n",keybuf);
}
.


But with this part alone, I could'nt import the kbuflen and the keybuf 
from the xforms to WorkArea. This means I need another part in your 
patch, right?  But which part?  I need to know...............


Regards,


cghan

Reply via email to