Greg Ercolano wrote:
> Michael Schmid wrote:
>> Is there any methode to simulate events?
>> -> Simulate the event in process1 ("Software-Keyboard" on touch)
>> -> Get the event in process2 (My GUI-App.)
Like the thread Ian found, maybe you don't need to simulate events,
but just want to add/remove characters from an input widget from
another process?
If so, you could make a TCP oriented application, where process#1
opens a TCP connection to GUI process #2, and have a little command
language where you can send the name of the input widget, and a string
of text to set it to, eg:
setinput "Hello"
..and in your GUI app, on receiving that message via TCP, do
something like:
char arg[80];
if ( sscanf(cmd, "setinput \"%79[^"]", arg) == 1 )
{
yourinputwidget->value(arg);
}
..which would set the value of 'yourinputwidget' to "Hello".
I suppose in place of TCP you could also use named pipes, or
some other kind of IPC. But TCP would let you send commands
from any machine, not just the local one, which could be useful.
And if you wanted to limit the TCP connection to just the local
machine, just bind the listener to the 127.0.0.1 address, instead
of the network address of the machine. This way it will only listen
for connections from the local machine (to prevent remote host control).
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk