Callback functions have the following format:
void functionNameCallback (Widget w, XtPointer client_data, XmPushButtonCallbackStruct *cbs)
The callback function parameters are:
The first parameter of the function is the widget associated with the function (button in our case).
The second parameter is used to pass client data to the function. It is not used in our sample program.
The third parameter is a pointer to a structure that contains data specific to the particular widget that called the function and information on the event that triggered the call. The structure we have used is a XmPushButtonCallbackStruct, since we are using the PushButton Widget.
This article was a mere introduction to the world of X/Motif programming. We've looked at a simple Motif program to introduce the basic concepts in building the graphical user interface. For more information, see Resources.
Ibrahim Haddad (firstname.lastname@example.org) is a Ph.D. student in the computer science department at Concordia University in Montréal, Canada. Ibrahim was first introduced to Linux (0.99) and Motif at the Lebanese American University. Among his interests are e-commerce, web applications, distributed objects and helping his friends at LinuxLeb.com (Linux Lebanon).
- Readers' Choice Awards 2013
- Linux Kernel News - November 2013
- RSS Feeds
- Mars Needs Women
- Sublime Text: One Editor to Rule Them All?
- December 2013 Issue of Linux Journal: Readers' Choice
- Raspberry Pi: the Perfect Home Server
- Advanced Hard Drive Caching Techniques
- New Products
- Web Administration Scripts
- There are factors which are
3 hours 28 min ago
- Gnome 3 ?
4 hours 13 min ago
- Reply to comment | Linux Journal
8 hours 20 min ago
- "Redis RethinkDB 4.5%" on Best NoSQL Databases
18 hours 26 min ago
- on the ground
1 day 48 min ago
- I was able to read the whole
1 day 2 hours ago
- since i have read the title i
1 day 5 hours ago
- Belanja Online Cari Voucher Diskon
1 day 5 hours ago
- The kernel doesn't really
1 day 17 hours ago
1 day 18 hours ago