Plans

James A. Crippen james at unlambda.com
Fri Jun 21 20:07:00 UTC 2002


Following are some changes I'd like to discuss.  They're mostly
high-level changes to the way things are organized.  This is because
Eclipse is just starting to be noticed and now would be a good time to
plan for future growth.  Lower level details can be worked on a little
later once the system has 'more room'.

This is all a big brain dump of things I've been thinking about.
Separate threads for discussing each subject should probably be
started...

Menus
-----
Currently there are a couple of different menu classes, one for root
menus, one for submenus, etc.  I'd like to see them all collapsed into
a single menu class that doesn't depend on whether it is parented by
another menu or not.  I also think that menus should be completely
disconnected from the mouse buttons.  This would allow them to be
callable from any random event, like a keypress, window button press,
etc.  This would make menus a little simpler to understand, and a lot
more versatile.

Documentation
-------------
*Everything* should have a docstring.  Each file should have a summary
in the header explaining what is in the file and what its contents are
for.  And every file should have a CVS Id keyword in its header.  The
latter I think I should just go ahead and do right now before anything
else is done.

Packaging
---------
I think that for convenience there should be two major packages,
ECLIPSE and ECLIPSE-INTERNALS, with nicknames of EWM and EWMI
respectively.  Most of the contents of EWMI should be imported from
other packages.  All the other packages that are Eclipse-specific
should have names prefixed with "EWM-".  Thus the Gnome code would be
in EWM-GNOME.  Most of the EWM package would just be symbols inherited
from EWMI.  User code should go in EWM-USER by default.  Any
Eclipse-specific extensions to CLX should go in EWM-CLX-EXTENSIONS.

Also considering packaging, would it be terribly difficult to separate
the Gnome and Extended Window Manager Hints code?  I'd like to see
them kept separate, since one is specific to a particular project
whereas the other is a draft X standard (or pseudostandard anyway).
This would make it easier for someone like me who doesn't use Gnome or
KDE to easily include the ExtWM code in my Eclipse image but not the
Gnome code, which would just waste space for me.  If this separation
is possible then I think the two should be kept in separate files as
well as separate packages for clarity.

Speaking of ExtWM, I'd like to see this stuff be mandatory, not an
option.  It should always be loaded whether the user likes it or not.
This is because it's headed towards being a standard and Eclipse ought
to promote it.  And there's plenty of useful stuff in it.

Files
-----
I'd like to split a lot of the code in global.lisp, wm.lisp,
menu.lisp, and maybe other files out into their own files.  I don't
think any file should be much larger than 10KB, including comments and
docstrings.

Here's my ideas on splitting up the files.  To start with, global.lisp
contains a lot of miscellaneous stuff.  It looks like it was
originally supposed to be a container for the big pile of constants,
variables, and parameters.  I'd say that most of these should be moved
either to files where they are closely related, or moved into a
top-level file called "eclipse.lisp" which would also contain the
ECLIPSE function and other initialization code.

The system-dependent code in global.lisp should be moved into either a
file called "sysdep.lisp" or into individual files named after each
Lisp system and kept in a "sysdep" directory.  I'm more in favor of
the latter.

...time passes...

I just scribbled together a list of files and their contents that
makes sense.  It's easier to read than my babble.  All files have
a ".lisp" extension except for directories.

"eclipse"       Top level function ECLIPSE, initialization, etc.
"pixmaps/"      Directory containing code to translate different image
                formats into X pixmaps (eg PNG, XPM files, etc)
"gestures"      Container for key-combo code, cursor movement, etc.
"virtual-screens"
                This already exists, and should have the other vscreen
                code in wm.lisp moved into it
"application"   The base object class, ROOT, and APPLICATION classes
                I was thinking of a better name for OBJECT, maybe
                'gobject' (for "graphics object") or something?
"buttons"       Window buttons, eg titlebar, maximize, iconify, etc.
"icons"         All code for icons, iconification, an icon box, etc.
                By 'icon box' I mean a window that can contain all the
                icons, or a restricted part of the screen where all
                icons will go (like MWM or Afterstep).  Icons should
                also be standardized to 64x64 pixels or maybe 128x128
                or whatever other WMs tend to use.
"decoration"    Window decoration management code
"focus"         Focus management code
"menu"          Already exists, but *BLACK* and *WHITE* should be
                moved from it into eclipse.lisp, and their values
                taken from BLACK_PIXEL and WHITE_PIXEL in the root
                colormap.  They should be moved to colors.lisp,
                actually.
"dialogs"       Simple dialog and 'monolog' boxen.  A 'monolog' box is
                a dialog box that doesn't take any user input, like
                the little box that displays resize/move data in some
                WMs.  This is an 'output-only' window, like the XLoad
                program.
"gnome"         Gnome interface code.
"icccm"         Any ICCCM code that doesn't fit anywhere else.
"events"        General event processing.  Most EVENT-PROCESS methods
                belong near what they're specialized for, not in this
                file.  The generic EVENT-PROCESS would be here though.
"screenshots"   Just that.  Screenshot code.
"ext-wm-hints"  Code for ExtWM Hints compliance that doesn't fit
                anywhere else.
"tasks"         Same as the current programmable-tasks.lisp but with a
                shorter name!  Maybe "ptasks" instead?
"cursor"        Already exists, but some other code (in wm.lisp for
                instance) should be moved into it.  Oh, and +BLACK+
                and +WHITE+ should be taken from the BLACK_PIXEL and
                WHITE_PIXEL X properties instead of defined here.
"colors"        Color and colormap handling code.
"clx-ext/"      Extensions to CLX that are Eclipse-specific.  Other
                extensions should be merged from here back into CLX
                eventually.  Until they are they would live in this
                directory, in appropriately named files.
"sysdep/"       Nonportable code depending on particular Lisp
                systems.  Each file should be named after its system.
"winops"        General window operations, eg resize, move, raise,
                lower, etc.
"x"             Basic X functions, like OPEN-CLX-DISPLAY.

Okay, this message is way too long.  I don't want to chop it up
though.  Please reply to parts of it instead, and change the subject
appropriately.

'james

-- 
James A. Crippen <james at unlambda.com> ,-./-.  Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us   |  |/  | USA, 61.20939N, -149.767W
Y = \f.(\x.f(xx)) (\x.f(xx))         |  |\  | Earth, Sol System,
Y(F) = F(Y(F))                        \_,-_/  Milky Way.



More information about the eclipse-devel mailing list