Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-04-2007, 08:41 AM   #1
LQ Newbie
Registered: May 2005
Distribution: Redhat
Posts: 25

Rep: Reputation: 15
what are callback functions ?


I would like to know about callback functions.
What are callback functions ? how are they used ? how is it helpful ?

Thanks in advance,
Old 01-04-2007, 11:14 AM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Callback functions are a concept that describes an architecture where a piece of core code makes calls to one or more functions that are application-specific. The concept is often used in user interface systems, where the application developer writes the callback functions, which define the functionality of the specific application. Frequently, the callback functions are invoked in response to events, such as specifc keystrokes or mouse events. The developer defines what happens when these events occur, thus determining the behavior of the application. It is a common API idiom that allows a clean separation of the core library from the application-specific code.
An easy way to see the architecure at work might be to use something like the Glade interface designer. Using the tool, a developer builds the look & feel of the application by dropping down screen widgets such as buttons, entry boxes, menus, etc. Then, a code template is generated, which contains empty callback functions. The developer fills in the details of the callback functions with application-specific code, and then builds the application. At runtime, the callbacks are invoked by the core user-interface code, in response to end-user generated events.

--- rod.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
gtk signals and callback functions samel_tvom Programming 7 10-26-2005 05:03 PM
Problem with Callback! Linuxnewbie Linux - Networking 1 02-24-2004 01:55 AM
pointers to functions/member functions champ Programming 2 03-28-2003 06:22 PM
ISDN + callback zeky Linux - General 0 12-25-2002 07:15 AM
Dailup callback Bogdan Linux - Newbie 0 12-21-2001 02:56 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration