Skip to Content
Volume 7A: XView Programming Manual
book

Volume 7A: XView Programming Manual

by Dan Heller
October 1994
Intermediate to advanced
770 pages
22h 58m
English
O'Reilly Media, Inc.
Content preview from Volume 7A: XView Programming Manual
Xv_Window window;
Canvas canvas;
CANVAS_EACH_PAINT_WINDOW(canvas, window)
draw_into_window(window);
CANVAS_END_EACH
Because the paint windows are different from the view windows, a slightly different method
is used for getting view windows:
Xv_Window view;
Canvas canvas;
int i = 0;
while (window = (Xv_Window)xv_get(canvas, OPENWIN_NTH_VIEW, i)) {
/* process
window
*/
i++;
}
There is also a macro that loops through all the views in the canvas:
Xv_Window view;
Canvas canvas;
OPENWIN_EACH_VIEW(canvas, view)
...
OPENWIN_END_EACH
You can get the paint window associated with a view by using the attribute CANVAS_
VIEW_PAINT_WINDOW
:
Xv_Window view;
Xv_Window paint_window;
paint_window = (Xv_Window)xv_get(view, CANVAS_VIEW_PAINT_WINDOW);
This is useful in situations where you are given the view window and need to get the paint
window associated with it. For example, the routines called when views are split or joined
are passed handles to view windows. When a view is split, you will need to get the paint
window associated with the new view to install event or repaint callbacks.
5.7 Handling Input in the Canvas Package
This section discusses, to a limited degree, the method for handling and specifying events in
a canvas. For a detailed discussion of the types of events used and the proper method for
handling them, see Chapter 6, Handling Input.
Canvases and
Openwin
Canvases and Openwin 105
5.7.1 Default Events
The default
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Volume 6A: Motif Programming Manual

Volume 6A: Motif Programming Manual

David Brennan, Dan Heller, Paula Ferguson

Publisher Resources

ISBN: 9780937175873