LinuxQuestions.org
Visit Jeremy's Blog.
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, 09: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, 12:14 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
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


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 06:03 PM
Problem with Callback! Linuxnewbie Linux - Networking 1 02-24-2004 02:55 AM
pointers to functions/member functions champ Programming 2 03-28-2003 07:22 PM
ISDN + callback zeky Linux - General 0 12-25-2002 08:15 AM
Dailup callback Bogdan Linux - Newbie 0 12-21-2001 03:56 PM


All times are GMT -5. The time now is 12:02 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration