Skip to Content
Volume 6A: Motif Programming Manual
book

Volume 6A: Motif Programming Manual

by David Brennan, Dan Heller, Paula Ferguson
September 1993
Intermediate to advanced
1014 pages
28h 26m
English
O'Reilly Media, Inc.
Content preview from Volume 6A: Motif Programming Manual
There is essentially no type checking when you set resources in application code because of the general nature of the
Xt resource−setting API. The XtSetValues() macro takes an array of generic structures, and all of the values are
represented by the XtArgVal type. Therefore, the compiler cannot perform its usual type checking. You can get
partial type checking in C by using convenience functions, but only a few exist compared to the total number of
resources. If you set a resource to the wrong type in application code, the results are unpredictable. Nothing may
happen, but more likely the error will cause strange behavior and/or crash the application. Unfortunately, the source of
this kind of error is usually difficult to track down.
27.3.3 Resource Type Support
You can set every resource of a Motif widget from either a UIL module or application source code, while X resource
files allow you to set nearly every type. In source code, resource type support is almost inherent. As long as you
include the right header file and know the format of a resource type, you can create a value. Creating values for types
in non−Motif widget sets is no different, since you can use X, Xt, or Motif functions to create complex types.
Type support in UIL is built into the compiler; each type is specified with a unique literal syntax. Because UIL is
designed to support Motif, the built−in types are limited to the types used by the Motif widget set, and there is no way
to add a new type short of modifying the UIL ...
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 7A: XView Programming Manual

Volume 7A: XView Programming Manual

Dan Heller

Publisher Resources

ISBN: 9780596000431