LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 15
what are callback functions ?


Hi,

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

Thanks in advance,
rbh
 
Old 01-04-2007, 11:14 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:55 AM.

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