DEC Text Processing Utility Program Development

5.2Programming in DECwindows DECTPU

5.2.4.4Internally Defined DECTPU Callback Routines with Widgets Not Defined by UIL

Although the SET (WIDGET) built-in procedure lets you specify values for various resources of a widget, there are restrictions on specifying values for callback resources of widgets. When a widget is not part of an X Resource Manager hierarchy, specify the names of the callback resources in the array you pass to SET (WIDGET), and specify 0 as the value of each such callback resource. DECTPU automatically substitutes its common callback entry point for the 0 value. A widget calls back only for those reasons specified in the widget’s argument list. If a reason is omitted from the list, the corresponding event does not cause a callback.

5.2.4.5 Application-Level Callback Action Routines

When DECTPU receives a widget callback, it identifies and executes the layered application procedure or learn sequence that has been designated as the callback action routine. You can designate a procedure or learn sequence as a callback action routine either when the widget is created, by using the CREATE_WIDGET built-in procedure, or at some later time, by using the SET (WIDGET_CALLBACK) built-in procedure. When you specify an application-level callback program or learn sequence with CREATE_WIDGET or SET (WIDGET_ CALLBACK), all widgets in the same X Resource Manager hierarchy have the same callback program or learn sequence. Therefore, the callback program or learn sequence must have a mechanism for handling all possible callback reasons.

5.2.4.6 Callable Interface-Level Callback Routines

If you are layering an application on DECTPU or on EVE, you can specify callable interface-level callback routines only if you are specifying a widget’s callback resources in a User Interface Language (UIL) file.

Callbacks can pass values known as closures. Closures are strings or integers whose function depends on the application you are writing. (DECwindows documentation refers to closures as tags.) For more information about what closures are and how to use them, see Section 5.2.5.

You use the DECTPU callable interface routine TPU$WIDGET_INTEGER_ CALLBACK as the callback routine for all callbacks that have an integer closure. You use the DECTPU routine TPU$WIDGET_STRING_CALLBACK for all callbacks that have a string closure.

When a widget is part of an X Resource Manager hierarchy, do not include callback resource names or values in the array you pass to SET (WIDGET). Instead, specify the callback routine in the UIL file. When a widget is not part of an X Resource Manager hierarchy, specify the names of the callback resources in the array you pass to SET (WIDGET), and specify 0 as the value of each such callback resource. DECTPU automatically substitutes its common callback entry point for the 0 value. A widget calls back only for those reasons specified in the widget’s argument list. If a reason is omitted from the list, the corresponding event does not cause a callback.

DEC Text Processing Utility Program Development 5–9

Page 109
Image 109
Compaq AA-PWCBD-TE manual Application-Level Callback Action Routines, Callable Interface-Level Callback Routines

AA-PWCBD-TE specifications

The Compaq AA-PWCBD-TE is a highly regarded laptop battery designed to provide reliable power to a range of Compaq laptop models. As technology continues to evolve, the necessity for efficient and long-lasting batteries becomes increasingly important, especially for students, professionals, and anyone reliant on portable computing.

One of the standout features of the AA-PWCBD-TE is its impressive capacity, designed to enhance the performance of your device. With a power capacity of around 5200 mAh, this battery is engineered to provide extended usage times, allowing users to work on the go without frequent interruptions for recharging. The battery supports efficient energy management, contributing to the overall longevity of the device.

Additionally, the AA-PWCBD-TE integrates advanced lithium-ion technology, which is favored for its reliability and minimal memory effect. Lithium-ion batteries typically offer a higher energy density compared to older technologies, meaning they can store more energy in a smaller size. This technology also supports faster charging times, making it a convenient solution for busy users.

Safety is another vital characteristic of the AA-PWCBD-TE. It features built-in protection against overcharging, overheating, and short-circuit conditions, which helps ensure the safety of both the battery and the device itself. This level of protection is crucial, especially in professional environments where equipment failure can lead to productivity losses.

Compatibility is also a key aspect of the AA-PWCBD-TE, as it is designed to fit a variety of Compaq laptop models. Users can easily determine whether this battery is suitable for their specific model, simplifying the buying process and ensuring optimal performance.

In terms of weight and dimensions, the AA-PWCBD-TE is designed to be lightweight and compact, adding minimal bulk to the laptop while still delivering powerful performance. Users can enjoy the balance of efficiency and portability, making it an ideal choice for those who travel frequently or require a battery that doesn't compromise on power.

Overall, the Compaq AA-PWCBD-TE stands out as a dependable and efficient laptop battery that enhances the user experience. With its impressive capacity, cutting-edge technology, and safety features, it is a valuable accessory for anyone looking to improve their mobile computing capabilities.