Module CS/plugins/console/input/standard/

back to main page

Summary Period: 2001-03-24 to 2003-06-22

Modules

[root]/CS/plugins/console/input/standard

Lines Of Code


Total Lines Of Code: 483 (2003-07-11 20:29)

Authors

Author Changes Lines of code Lines per change
Totals 44 (100.0%) 646 (100.0%) 14.6
sunshine 19 (43.2%) 542 (83.9%) 28.5
jorrit 12 (27.3%) 75 (11.6%) 6.2
philwyett 7 (15.9%) 11 (1.7%) 1.5
matzebraun 3 (6.8%) 9 (1.4%) 3.0
norman 2 (4.5%) 6 (0.9%) 3.0
ab031ns 1 (2.3%) 3 (0.5%) 3.0

Most Recent Commits

sunshine 2003-06-22 22:38

Eric Sunshine removed the unused, obsolete, and deprecated top-level <name>
node from the .csplugin files.

0 lines of code changed in:

sunshine 2003-06-05 15:44

Eric Sunshine performed Phase Three of the elimination of the monolithic
scf.cfg:

-*- Eliminated the SCF information which was hardcoded in the .cpp files
of plugin modules, and which duplicated information in the external
.csplugin files.

-*- Plugin modules no longer maintain and export a monolithic class list.
Now, each factory implemented by the code is exported automatically.

-*- Added a new <implementation> child node to the <class> node in
.csplugin files. The value of this node is the name of the C++ class
which implements the SCF class. For instance, C++ class csVFS
implements crystalspace.kernel.vfs.

-*- Eliminated the following SCF macros which were related to exporting
SCF information from .cpp code and/or registering classes manually:

SCF_EXPORT_CLASS_TABLE
SCF_EXPORT_CLASS
SCF_EXPORT_CLASS_DEP
SCF_EXPORT_CLASS_TABLE_END
SCF_REGISTER_STATIC_CLASS_DEP

-*- Eliminated the following methods from iSCF:

RegisterStaticClass
RegisterClassList

-*- Plugin modules are now initialized/shutdown lazily as classes are
requested from them. The first time a class is requested, the plugin
is initialized. The plugin is shutdown after the last class instance
has been destroyed.

-*- Fixed bug in scf.h where SCF_PRINT_CALL_ADDRESS was not being enabled
for gcc 3.x.

-*- Fixed bug in win32.jam where GenerateExportDefs rule failed to ensure
that directory containing output file existed before creating file.
Also fixed bug where it failed to set up a dependency between the
input and output files.

-*- Still To-Do:

- Remove references to scf.cfg and scfreg from documentation. Also
document new .csplugin resources.

- Add platform-specific function to scan and locate plugins
automatically rather than using the ad-hoc approach inherited from
scanning for .scf files.

- Add platform-specific function to query a plugin's meta-information.
This should be used by SCF to do the raw extraction. Provide and
finalize API for higher-level clients to access meta-information.

- Augment static linking to work with the new facility. (Removal of
the hardcoded SCF information, has now broken static linking. It
worked until this time, even with all of the preceding changes.)

1 lines of code changed in:

jorrit 2003-05-29 08:05

Replaced NULL with 0.

6 lines of code changed in:

sunshine 2003-05-26 09:49

Eric Sunshine performed Phase One of the elimination of the monolithic
scf.cfg:

-*- Plugin modules are now self-describing. This information can be
queried at run-time without having to actually load the module.

-*- The plugin maintainer now manages the plugin's meta-information in an
external .csplugin file, rather than hard-coding the information into
the plugin's source code. The mechanism by which the meta-information
is bound to the plugin is platform-dependent. Presently, all
platforms simply lay down the meta-information in a plain text file
alongside the plugin itself; with the same basename and extension
.csplugin. This may change in the future. For example, on MacOS/X,
the meta-information will probably be encapsulated within the plugin's
bundle wrapper.

-*- Plugin meta-information is now maintained in XML format. Here is an
example:

<?xml version="1.0"?>
<!-- gl3d.csplugin -->
<plugin>
<name>gl3d</name>
<scf>
<classes>
<class>
<name>crystalspace.graphics3d.opengl</name>
<description>OpenGL 3D graphics driver</description>
<requires>
<class>crystalspace.font.server.</class>
</requires>
</class>
</classes>
</scf>
</plugin>

-*- Since meta-information is now extensible, maintainers can choose to
publish supplementary information about plugins (in addition to the
SCF information already published). For example, image loading
plugins could publish "image indendification" information which would
allow the image loading multiplexor to selectively request image
loading plugins on-demand, rather than requesting all plugins
unconditionally, even if they are not needed. Here is an example of a
possible meta-information table for the PNG loader:

<?xml version="1.0"?>
<!-- cspngimg.csplugin -->
<plugin>
<name>cspngimg</name>
<scf>...</scf>
<imageloader>
<imagetype>
<class>crystalspace.graphic.image.io.png</class>
<identify>
<mimetype>image/png</mimetype>
<extension>png</extension>
<extension>PNG</extension>
<scan length="4" bytes="\0x89PNG"/>
</identify>
</imagetype>
</imageloader>
</plugin>

In this example, the PNG loader meta-information tells the multiplexor
several different ways to identify a PNG image: by checking file
extension, if available; by checking MIME type, if available; by
checking for the magic-string "\0x89PNG" in the raw image data. If
the multiplexor identifies the image as PNG, only then will it
actually request the PNG loader.

-*- Added the --meta-file directive to msvcgen.pl to allow specification
of the meta-information file for a module. The value of this option
is interpolated into template files via the new %metafile% variable.
msvcgen.mak now utilizes this flag with the value of the new
INC.PROJECT makefile variable. Augmented the MSVC6 and MSVC7 plugin
template files (plugin.tpl) to make use of %metafile%.

-*- Changed the file extension for plugins on MacOS/X from .csplugin to
.csbundle to avoid conflict with new meta-information resource which
uses the extension .csplugin.

-*- Still To-Do:

- Augment SCF to utilize the new meta-information resources, and to
understand the new XML format. Presently, these resources are
ignored at run-time.

- Add platform-specific function to scan and locate plugins
automatically, rather than relying upon a monolithic registry such
as scf.cfg.

- Add platform-specific function to query a plugin's meta-information.

- Eliminate the monolithic scf.cfg.

- Augment static linking to work with the new facility.

- Eliminate the hard-coded SCF registration information in each
plugin's source code.

15 lines of code changed in:

sunshine 2003-04-27 11:33

Eric Sunshine made the following changes:

-*- Modified configure.ac so that it emits a SRCDIR property to
config.mak. This value represents the --srcdir argument given to the
configure script (or "." if --srcdir is omitted). This points at the
directory containing the CS source code (which may differ from the
build directory, which is typically the current working directory).

-*- Modified makefiles and build scripts throughout the project so that
they respect $(SRCDIR). This allows the project to be built in a
directory other than the source directory, thus it is possible to
place the source directory on a readonly filesystem (such as a
CD-ROM), or to share a single NFS-mounted source directory among
different builds, where each build inhabits its own directory. For
example, if CS resides at /home/CS and you wish to build the project
in /home/build:

% cd /home/build
% ../CS/configure
% make -k all
% make install

(Note that the Jam-base build system already supports this build
paradigm.)

-*- Modified configure.ac so that it emits EXTENSIVE_MEMDEBUG to
config.mak since this variable is used by Makefile.in for the
`showconfig' target.

-*- Modified configure.ac so that it emits MONITOR_MAKEFILE_CACHE when the
value is either "yes" or "no", instead of emitting it only when the
value is "yes". This was necessary because CS/mk/cache.mak prints the
value of this variable as part of $(SYSMODIFIER).

3 lines of code changed in:

matzebraun 2003-04-08 20:19

added the Jamfiles

9 lines of code changed in:

ab031ns 2002-12-23 22:26

Renamed/corrected header defines to CS coding-style.

3 lines of code changed in:

sunshine 2002-08-07 13:25

Eric Sunshine (hopefully) worked around a problem caused by buggy stat()
on Win9x and WinME where a bogus result is returned if the path has a
trailing slash. This causes problems with the makefile dependency rules
which depend upon $(OUTBASE), $(OUTOS), $(OUTPROC), or $(OUT), all of
which end with a slash, since make thinks that those directories don't
exist even when they are present. Consequently, make tries invoking
$(MKDIR) on already-present directories. The work-around was to redefine
these variable so without the trailing slash. Also updated all makefiles
throughout the project to take into account that these variables are no
longer defined with a trailing slash.

6 lines of code changed in:

norman 2002-03-24 20:27

lines array was not freed

2 lines of code changed in:

philwyett 2002-03-10 01:08

ARGH - Major revert. What was I thinking?

I am blaming jetlag. Thats my story and I'm sticking too it. :)

1 lines of code changed in:

philwyett 2002-03-10 00:41

Fixed all the warnings caused by changes to:

CS_IMPLEMENT_APPLICATION and CS_IMPLEMENT_PLUGIN

Nothing thrilling, but some of the changes are blind into other ports so
be warned if you get the odd compiler warning or error.

Also changed lib name which msvc will use for new divx for plugin to
eliminate conflicts.

1 lines of code changed in:

matzebraun 2001-12-27 17:07

reverted EventHandler changes since there was no Event handler in Console plugin before

0 lines of code changed in:

jorrit 2001-12-27 15:50

- Fixed a bug in software renderer and engine plugins. They were
not unregistering their event handlers at destruction time.
Also the event handlers are no longer embedded interfaces since
that prevents proper cleanup (i.e. problem with circular refs).
- Did the same to various other plugins (aws, sequencer, iso engine,
canvases, renderers, ...).
- Removed the reference to the plugin manager from the OpenGL and
perfstats plugins. This is also a circular reference.

27 lines of code changed in:

jorrit 2001-10-09 11:29

- Removed iSystem::GetObjectRegistry().
- The object registry is now a parameter to the system driver and
is no longer created by the system driver itself. Instead
csInitializer::CreateObjectRegistry() will now create the object
registry.
- Moved the cleanup of the object registry to
csInitializer::DestroyApplication(). Also moved the cleanup of
SCF to there.
- Added Clear() to the iObjectRegistry interface.
- Several system drivers performed some special code right before
NextFrame() was being handled (Win32, BeOS, ...). This special
code has now moved to an event handler in the system driver instead.
The system driver will now listen to cscmdPreProcess and perform
the functionality that used to be in NextFrame().
- Removed NextFrame() from iSystem, csSystemDriver and all subclasses
of csSystemDriver (SysSystemDriver for all platforms). In case
you needed to explicitely call this function (in CS only CSWS did
this) then you can call iVirtualClock::Advance() followed by
iEventQueue::Process().
- csApp now calls Advance()/Process().
- The result of this is that the iSystem interface has become empty.
So it can finally be removed!!! In addition CS_GET_SYSTEM is now
also gone.
- Moved the virtual clock implementation in the system driver to
a seperate csVirtualClock in csutil. The system driver no longer
creates and manages the virtual clock. The already existing
csInitializer::CreateVirtualClock() will now create and register
the virtual clock.

0 lines of code changed in:

jorrit 2001-08-27 16:07

Split iPlugin interface into iComponent and iEventHandler and
removed iPlugin interface. iComponent now contains the Initialize()
function and iEventHandler contains HandleEvent. The idea is
that event handling is a seperate concept from plugins so
HandleEvent does not belong in iPlugin. In addition the notion
of initializing is not plugin specific either so it also doesn't
belong to iPlugin. This means there is actually nothing left
in iPlugin so it is removed :-)
To change code to work with this you basically have to replace
iPlugin with iComponent. If you also need events (i.e. you used
HandleEvent) then you have to additionally create a new
embedded iEventHandler interface object.

20 lines of code changed in:

sunshine 2001-08-26 16:00

Eric Sunshine made the following changes to the project:

-*- Removed all event related code and functionality from csSystemDriver
and the cssys library as part of the continuing effort to eliminate
the monolithic system driver concept. All event related functionality
has been generalized and moved into the csutil library.

-*- Rather than the system driver being responsible for event related
activities, an object of type iEventQueue is now available to clients
via the shared object registry (iObjectRegistry) and is registered
with the name "crystalspace.event.queue".

-*- Added new SCF interface iEventQueue. All event-related activities in
CS are now performed by interacting with an object implementing this
interface. Everything related to a particular event queue is now
maintained by that queue rather than being manually maintained by the
system driver. Examples of ancillary functions and objects now
maintained by the event queue include event outlets, event cords, and
event handlers. iEventQueue provides the following main functions
(along with some other minor ones):

- Process(); Processes the event queue, dispatching each contained
event to the appropriate event handler. Also responsible for
sending the cscmdPreProcess and cscmdPostProcess events to
interested listeners. This method takes over all the major
functionality which used to be handled by iSystem::NextFrame().
Re-implemented iSystem::NextFrame() as a very thin cover over this
method.

- Dispatch(); Actually dispatches each event retrieved from the queue
by Process(). This method takes over all the major functionality
which used to be handled by iSystem::HandleEvent().

- RegisterListener(); Entities interested in listening for events
register with the event queue via this method. This replaces the
old iSystem::CallOnEvents() method. Also added RemoveListener() to
provide a way for entities to stop listening; and
ChangeListenerTrigger() to provide a way for entities to alter the
set of event types in which they are interested.

- CreateEventOutlet(); Returns a new event outlet to the caller.
Replaces iSystem::CreateEventOutlet().

- GetEventOutlet(); Returns the shared event outlet for this
particular event queue (for those cases where creating a new one is
overkill). Replaces iSystem::GetSystemEventOutlet().

- GetEventCord(); Returns the event cord for a particular category and
subcategory. Replaces iSystem::GetEventCord().

-*- The system driver now registers itself as an event listener with the
shared event queue just like all other modules which are interested in
events. This allows csSystemDriver to listen for the cscmdQuit event
in order to set its `Shutdown' variable appropriately. It also allows
the HandleEvent() method in subclasses of csSystemDriver to function
as expected. Note that this is a merely a temporary state of affairs,
as the system driver will soon cease to exist.

-*- Converted all applications, plugin modules, and other support code to
work with the new event system organization.

-*- Because the generic input drivers, csKeyboardDriver, csMouseDriver,
and csJoystrickDriver, are tied closely to event outlets, they were
also moved from cssys to csutil.

-*- The generic input drivers, csKeyboardDriver, csMouseDriver, and
csJoystrickDriver, are themselves now responsible for listening for
the cscmdFocusChanged event, rather than relying upon the system
driver to do so on their behalf.

-*- Added new SCF interfaces: iKeyboardDriver, iMouseDriver,
iJoystickDriver.

-*- Objects implementing iKeyboardDriver, iMouseDriver, and
iJoystickDriver are now made available via the shared object registry
(iObjectRegistry) under the following names, respectively:

crystalspace.driver.input.generic.keyboard
crystalspace.driver.input.generic.mouse
crystalspace.driver.input.generic.joystick

-*- Converted all applications and plugin modules to access the generic
drivers directly from the shared object registry rather than calling
upon iSystem methods to interact with these objects. Removed all
knowledge of these drivers from iSystem and csSystemDriver.

-*- Moved the utility functions csParseKeyDef() and csGetKeyDesc() in
cskeys.h and cskeys.cpp from cssys to csutil since they are totally
generic and have no platform-specific bindings.

-*- Fixed a nasty bug in csEventCord where it failed to unlock itself in
some cases when posting an event.

-*- Fixed a bad bug in csEventCord where it was leaking all events posted
to it.

-*- Fixed broken logic in iObjectRegistry::Unregister() where it did not
actually remove the entry for the object, but instead just left a
dangling (and potentially) dead pointer.

-*- iObjectRegistry implementation now correctly reference counts the
contained objects. It also now protects itself against modification
during its own destruction, since some of the objects which it is
removing from itself might also get destroyed and might try modifying
the registry.

-*- Moved mouse driver settings out of system.cfg and into mouse.cfg.
csMouseDriver is now responsible for accessing these settings itself
rather than relying upon the system driver to do so.

-*- Fixed bug in definition of SCF_IMPLEMENT_IBASE table for
csSystemDriver. The table neglected to mention that csSystemDriver
implements iObjectRegistry and iPluginManager. Added mention of
iPlugin which csSystemDriver now implements so that it can listen for
events from the event queue.

-*- Eliminated compilation warnings in aseie.cpp, dxfie.cpp, hrcie.cpp,
ivie.cpp, objie.cpp, povie.cpp, smfie.cpp, stlaie.cpp, and vlaie.cpp
about non-virtual destructor.

-*- Eliminated compilation warning about unused variable in md2ie.cpp.
Also fixed a memory leak.

-*- Eliminated compilation warning about `float' assigned to `int' in
spr2d.cpp.

-*- Fixed broken header-protection macros in intarray.h.

-*- Fixed g2dtest so that it once again actually displays a window. This
had been broken for quite some time.

-*- csSchedule no longer unnecessarily depends upon the system driver.

-*- csSchedule no longer publishes its private utility class.

-*- The cssys library no longer relies upon the csgeom library.

-*- Eliminated several compilation warnings from AWS. Worked around a
couple NextStep compiler shortcomings.

-*- Rewrote csRectRegion in csgeom so that it no longer relies upon the
csutil library. I think it is best if we keep csgeom free of any
csutil dependencies.

-*- Fixed csRectRegion so that, at destruction time, it no longer leaks
each of the csRect structures in its `region' list.

-*- Fixed the comment-style in csrectrg.h so that Doxygen will produce
proper documentation for csRectRegion.

-*- Repaired some overfull and underfull `hbox' warnings reported by TeX
for tutorial/wincvs/step1.txi.

-*- Finally, note that I eliminated quite a few unnecessary #include
directives from the event-related headers and from isys/system.h &
cssys/system.h. Since I am unable to test-compile every single port
of CS and every driver, port maintainers may have to add an #include
statement here and there in platform-specific and/or driver-specific
code.

4 lines of code changed in:

jorrit 2001-08-06 13:49

- Removed almost all usage of iSystem in the entire CS system. Instead
a pointer to the object registry (iObjectRegistry) is used. This
includes the following:
- iPlugin::Initialize().
- csConfigAccess class.
- csInitializeApplication().
- Constructor of csApp.
- Various others...
- Because iSystem is still needed in some cases (still busy with the
removal of that) there are some cases where you need to have a
pointer to the system. To get that pointer you can now use the
new CS_GET_SYSTEM define like this:
iSystem* sys = CS_GET_SYSTEM (object_reg);
Note that this define will go away as soon as iSystem is removed.
So it is only a temporary measure. CS_GET_SYSTEM is implemented
by asking the object registry where iSystem is now registered.
The use of iSystem is still required for using everything related
to events (this includes the iEventOutlet pointers and also the
elapsed time (GetElapsedTime()), GetMouseButton(), GetKeyState(),
Sleep(), NextFrame(), ...).
- For Python scripts this also means that the 'system' variable is
gone and has been replaced with 'object_reg'.
- Since they were not used I removed iSystem::Initialize(),
Loop(), Open(), and Close(). The csSystemDriver versions of these
functions are not removed though. They are still needed at this
moment.

5 lines of code changed in:

jorrit 2001-07-27 11:16

- Removed iSystem::Printf() and iSystem::PrintfV(). The plan is now
to use the reporter instead. To do this you can use the following
initialization code somewhere in your app or plugin init:
#include "ivaria/reporter.h"
iReporter* reporter = CS_QUERY_REGISTRY (object_reg, iReporter);
- Added csReport() conveniance function. This function will use
the object registry to see if there is a reporter. If so it will
use it, otherwise it will print to standard output. Example:
csReport (object_reg, CS_REPORTER_SEVERITY_ERROR,
"crystalspace.???.???", "Bad error in '%s'!", filename);
- Keep in mind when replacing Printf() with Report() that report
will automatically add a newline at the end of the string.
- In addition removed CS_MSG_ constants. Use the CS_REPORTER_SEVERITY_
constants instead. You can use the following translation:
CS_MSG_WARNING -> ..._WARNING
CS_MSG_FATAL_ERROR -> ..._ERROR
CS_MSG_INITIALIZATION -> ..._NOTIFY
CS_MSG_CONSOLE -> ..._NOTIFY
CS_MSG_STDOUT -> ..._NOTIFY
CS_MSG_INTERNAL_ERROR -> ..._BUG
CS_MSG_DEBUG_? -> ..._DEBUG
- Changed the csTextProgressMeter so that it now has an output
console as a parameter and not the msg type (CS_MSG_...) and
iSystem pointers.
- Did the same for csProgressPulse.
- Removed the 'mode' parameter (which used to be one of CS_MSG_...)
from the iConsoleOutput interface. None of the output console
plugins were using it and it is obsolete anyway.
- Added ... to iConsoleOutput::PutText() and also added PutTextV().
- Changed all libraries, apps, and plugins in CS to use the reporter
instead of iSystem::Printf(). This affects LOTS of files...
- Removed csSystemDriver::Warn() and Alert().
- Removed the console pointer in csSystemDriver.
- Removed ConsoleOut() from system driver. It was not used a lot
and in all cases it was defined as a normal puts. Also removed
specific ConsoleOut() implementations for some OS'es.
- Instead of ConsoleOut() there is now csPrintf() which works
more like printf (i.e. exactly like printf) but which can be
defined by the platform. The DJGPP port has its own implementation
of csPrintf() which can disable itself if graphics are enabled.
In general csPrintf() should always be used instead of printf.
Little of the code is doing that however.
- Also added csVPrintf() which is similar to vprintf().
- Removed Time() from system driver.
- Instead of Time() there is now csGetClicks(). Currently
iSystem::GetTime() has not been removed yet but that will call
csGetClicks().
- Moved the initialization of SCF from csSystemDriver::Initialize()
to the constructor of csSystemDriver. The problem is that SCF
is now required even before Initialize() is called in order to
be able to access the object registry and various objects in
that registry (like the commandline which typically is needed
BEFORE Initialize).
- Fixed a crash bug in Blocks.
- Fixed a problem with static linking for height generation
classes in both terrfunc and csparser.

4 lines of code changed in:

jorrit 2001-07-18 11:02

- Changed the terrain engine to use an SCF class for getting height
and normal information instead of the traditional callback system.
Basically this means that csTerrainHeightFunction and
csTerrainNormalFunction are now iTerrainHeightFunction and
iTerrainNormalFunction.
- Reworked the cstool texture generation tool to also use a
SCF structure for the slope and height function instead of a
regular callback. This also solves a memory leak problem.
- Changed csTextureCallback (used by iTextureWrapper) to
the iTextureCallback SCF structure.
- Changed DeleteNotify() callback system in iFont to iFontDeleteNotify.
- Changed csConsoleExecCallback() callback system to
iConsoleExecCallback. Renamed ExecuteCallback() to
SetExecuteCallback(). Added GetExecuteCallback().
- Changed GridChangeCallbackType (in iso engine) to
iGridChangeCallback.
- Also made iIsoCellTraverseCallback to be used by
iIsoCell::Traverse().
- The sequence manager was already using reference counted callbacks
but I changed it so that they use SCF too.
- Note for everyone. When adding a new callback to something please
use the system with SCF interfaces instead of the traditional
callback function with void* userdata. It is very hard to do good
memory management with that type of callback. With SCF callbacks
reference counting is used which is a lot cleaner.

12 lines of code changed in:

philwyett 2001-07-03 04:40

Changed the following:

iLoaderPlugIn -> iLoaderPlugin
eiPlugIn -> eiPlugin

This change is a change of PlugIn for Plugin in
all instances inside the libs, plugins and apps.

Work in progress...Hope will be finished today...

Also removed my commit log which for some reason
appeared in some files :-/

2 lines of code changed in:

(10 more)


Generated by StatCvs v0.2-dev