Re: How to get scroll bar infromation in C?



Thank you for your quick reply, Patryk. I would like to take a look at ATK. The reason I feed the application the fake mouse wheel events is because the mouse wheel usually can not scroll the window context horizontally. That is one of the main purposes of my program. I tried to use REL_HWHEEL to scroll horizontally but failed.

Thanks,

Frank

On Tue, Jun 23, 2009 at 11:51 AM, Patryk Zawadzki <patrys pld-linux org> wrote:
On Tue, Jun 23, 2009 at 6:50 PM, frank zhang<fz2018 gmail com> wrote:
> Hello,
>
>      I hope I am posting to the proper forum. Please let me know where I
> should post if this is not the right one.
>
>      I am writing a program in C and encounter a problem. I want to get the
> scroll bar information for an existing application such as a text file or a
> webpage opened in GNOME desktop. If the existing application window is the
> currently active window and it has scroll bars, my program needs to be able
> to move the mouse pointer onto the scroll bar and scroll the contents of the
> window up/down/left/right depending on the user choice. For example, when
> the user holds the 'CTRL' key and 'Right Arrow' key from the keyboard, the
> mouse pointer will jump from the current position to the middle of
> horizontal scroll bar and the window contents scroll to the right.
>
>       Could anyone shed some light on how to use GNOME API or GTK+ to do
> this?

I think you're better off exploring GNOME a11y interfaces (atk). Also
you might be able to get away with feeding applications with fake
mouse wheel events.

--
Patryk Zawadzki



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]