Thread View: comp.windows.interviews
2 messages
2 total messages
Started by david.a.copperman
Wed, 06 Jan 1993 16:20
tracking cursor motion in a separate process
Author: david.a.copperman
Date: Wed, 06 Jan 1993 16:20
Date: Wed, 06 Jan 1993 16:20
37 lines
2377 bytes
2377 bytes
I posted this question to the net earlier. I only got one response (thanks, Dave S), and I think I phrased the question in a way that made it appear rudimentary and therefore folks ignored it. Please try again - I need to know if I can do this before I commit to trying to learn IV, which appears to be a major undertaking. I have two processes, A and B. A is written in X (no higher-level packages). It puts up a single window. Process B forks and execs A, and waits for it to come up. Then it extracts the id (the X type is Window) of A's window. Process A (the graphics controller for a geographical information system) operates under the control of B. B needs to track cursor motion in A's window, so it (B) can do real-time screen-to-world coordinate conversion and show the coordinates in a window owned by B. B is to be written in a higher-level package. What I need to able to do is assign the Window of A's window to some object/widget/etc. in B, then register for cursor motion events. I understand that I can do X-level programming in a program written in IV. But it's very important to me to not have to access the X event queue in code separate from IV's code that does that - frankly, I'm not smart enough. I want B's code to be absolutely event driven, and simple enough that only one entity (i.e., IV) need be involved in controlling the X event queue. Is there some class in IV that I can use in this fashion? More specifically, can I create some object to which I can assign A's Window, register for cursor motion in that window, and IV will call the event handler for me? A separate question: B needs to be able to poll events going on in other software having nothing to do with the screen. I do that in a prototype using Xt via Xt signal (alarm) handling, and it's fine. Can I do some analog to this in IV? Thanks very much. Dave Copperman dac@hoqaa.att.com
Re: tracking cursor motion in a separate process
Author: Mark Linton
Date: Wed, 06 Jan 1993 17:45
Date: Wed, 06 Jan 1993 17:45
35 lines
2657 bytes
2657 bytes
In article <1993Jan6.162051.471@cbfsb.cb.att.com>, dac@cbnewsf.cb.att.com (david.a.copperman) writes: |> I have two processes, A and B. A is written in X (no higher-level |> packages). It puts up a single window. Process B forks and execs |> A, and waits for it to come up. Then it extracts the id (the X type |> is Window) of A's window. Process A (the graphics controller for |> a geographical information system) operates under the control of B. |> B needs to track cursor motion in A's window, so it (B) can do |> real-time screen-to-world coordinate conversion and show the coordinates |> in a window owned by B. |> |> B is to be written in a higher-level package. What I need to able to |> do is assign the Window of A's window to some object/widget/etc. in B, |> then register for cursor motion events. I understand that I can do |> X-level programming in a program written in IV. But it's very important |> to me to not have to access the X event queue in code separate from |> IV's code that does that - frankly, I'm not smart enough. I want B's |> code to be absolutely event driven, and simple enough that only one |> entity (i.e., IV) need be involved in controlling the X event queue. |> Is there some class in IV that I can use in this fashion? More |> specifically, can I create some object to which I can assign A's |> Window, register for cursor motion in that window, and IV will call |> the event handler for me? It sounds like you would need to write a subclass of the InterViews Window class that is given an initial X window id instead of getting one as the result of creating a window. |> A separate question: B needs to be able to poll events going on in |> other software having nothing to do with the screen. I do that |> in a prototype using Xt via Xt signal (alarm) handling, and it's fine. |> Can I do some analog to this in IV? Signals are a bit dangerous. Seems like it would be safer to set a timeout on the X input and then do your polling. You can use the timer features of Dispatcher to do this with InterViews.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads