JSignal 0.2
Sponsored Links
JSignal 0.2 Ranking & Summary
File size:
0.028 MB
Platform:
Any Platform
License:
GPL (GNU General Public License)
Price:
Downloads:
1306
Date added:
2006-03-27
Publisher:
Jason Barto
JSignal 0.2 description
JSignal is a loose port of the signal system implemented by GTKs GLib. JSignal project uses signals and handlers to allow for the registration of callback functions to events.
To use JSignal those classes which will emit signals (cause events) must register the signals that each class will emit. Note that if a class extends another class (has a superclass) it will inherit any signals registered by the parent class and can emit those signals as well. In addition a new global-type of signal can be registered which is class non-specific. Any class can emit a global signal.
After you have a class with registered signals you can begin connecting callback functions to those signals. Callback functions are connected (registered to listen for) to signals by specifying the signal and the object instance that will emit that signal; this registration results in the creation of a handler.
Multiple handlers can be configured for the same signal on the same object instance. In addition to instance-specific signal handlers a handler can also be registered to execute when a global signal (created using j_signal_new_global) is emitted; again, regardless of emitting instance. Note that when a global signal is emitted by an instance those handlers that are registered globally (using j_signal_handler_connect_global) will be executed BEFORE any instance-specific handlers.
To emit a signal - thus causing an event - the class which registered the signal should use the j_signal_emit function and pass any additional information to the callback function via the event detail argument. This detail object should be an array of name => value pairs.
Illustrative examples are provided below.
Note: In order for signal inheritance to work properly it is recommended that a classs prototype be given a parent member which points to the constructor of the classs superclass.
Main features:
- Multiple Handlers per Event
Multiple callback functions can be registered per signal per object instance.
- Signal Inheritance
The signals registered by an objects superclass are inherited by any extending child classes.
- Ordered Handler Execution
Like the DOM event handling system all handlers set to fire in response to a particular event fire in the order they were registered.
- Chained Handler Execution
Also like the DOM event handling model, when a handler returns a value of false any subsequent handlers will NOT be executed.
- Temporary Handler Blocking
Handlers can have blocks placed against them cumulatively; allowing for the selectively temporary disabling of handlers.
- Global Signals
Signals (as used in GLib) are class-specific. A signal registered under the class type of Integer can only be emitted by Integer instances. A global signal (registered using j_signal_new_global) can be emitted by any and all instances regardless of their class. This is essentially equivelant to registering a signal using the Javascript Object class type.
- Global Handlers
As signals are traditionally class specific it follows that handlers are instance specific. However global signals can be handled by both instance-specific handlers AND global handlers. A global handler is executed whenever a global signal is emitted, regardless of the emitting instance and its class type. Note that global handlers are executed BEFORE instance-specific handlers.
To use JSignal those classes which will emit signals (cause events) must register the signals that each class will emit. Note that if a class extends another class (has a superclass) it will inherit any signals registered by the parent class and can emit those signals as well. In addition a new global-type of signal can be registered which is class non-specific. Any class can emit a global signal.
After you have a class with registered signals you can begin connecting callback functions to those signals. Callback functions are connected (registered to listen for) to signals by specifying the signal and the object instance that will emit that signal; this registration results in the creation of a handler.
Multiple handlers can be configured for the same signal on the same object instance. In addition to instance-specific signal handlers a handler can also be registered to execute when a global signal (created using j_signal_new_global) is emitted; again, regardless of emitting instance. Note that when a global signal is emitted by an instance those handlers that are registered globally (using j_signal_handler_connect_global) will be executed BEFORE any instance-specific handlers.
To emit a signal - thus causing an event - the class which registered the signal should use the j_signal_emit function and pass any additional information to the callback function via the event detail argument. This detail object should be an array of name => value pairs.
Illustrative examples are provided below.
Note: In order for signal inheritance to work properly it is recommended that a classs prototype be given a parent member which points to the constructor of the classs superclass.
Main features:
- Multiple Handlers per Event
Multiple callback functions can be registered per signal per object instance.
- Signal Inheritance
The signals registered by an objects superclass are inherited by any extending child classes.
- Ordered Handler Execution
Like the DOM event handling system all handlers set to fire in response to a particular event fire in the order they were registered.
- Chained Handler Execution
Also like the DOM event handling model, when a handler returns a value of false any subsequent handlers will NOT be executed.
- Temporary Handler Blocking
Handlers can have blocks placed against them cumulatively; allowing for the selectively temporary disabling of handlers.
- Global Signals
Signals (as used in GLib) are class-specific. A signal registered under the class type of Integer can only be emitted by Integer instances. A global signal (registered using j_signal_new_global) can be emitted by any and all instances regardless of their class. This is essentially equivelant to registering a signal using the Javascript Object class type.
- Global Handlers
As signals are traditionally class specific it follows that handlers are instance specific. However global signals can be handled by both instance-specific handlers AND global handlers. A global handler is executed whenever a global signal is emitted, regardless of the emitting instance and its class type. Note that global handlers are executed BEFORE instance-specific handlers.
JSignal 0.2 Screenshot
JSignal 0.2 Keywords
JSignal
GLib
GTKs GLib
GTKs
JSignal 0.2
can be
Signal system
callback functions
signal
global
class
handlers
signals
registered
JSignal 0.2
Libraries
Bookmark JSignal 0.2
JSignal 0.2 Copyright
WareSeeker periodically updates pricing and software information of JSignal 0.2 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of JSignal 0.2 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
signals catalog
smoke signals
signals over the air
federal signal
forex signals
hand signals
global warming
what is global warming
cell phone signal booster
globalization
what causes global warming
global warming facts
causes of global warming
signals that a guy likes you
is global warming real
effects of global warming
types of flirt signals
signal stat
Related Software
Vala is a new programming language that aims to bring modern programming language features to GNOME developers. Free Download
Nailer project is a Glib application that uses MPlayer to generate thumbnails of video media files. Free Download
SigBrowser is a small tool to display large signals (up to 2 GB filesize / 1-6 channels / 16 bit integer). Free Download
Nanoserv is a sockets daemon toolkit for PHP 5.1+. Free Download
the core library that forms the basis for projects such as GTK+ and GNOME. Free Download
glib-java is a Java-Gnome library. Free Download
XML::XMetaL is a Perl module with dispatch class for XML::XMetaL development framework. Free Download
Ksetiwatch is a SETI@home monitor and work unit manager. Free Download
Latest Software
Popular Software
Favourite Software