# $Id: TODO,v 1.32 1998/08/13 23:14:49 gjb Exp $ -*- outline -*-

For scwm 0.9:

* Use only gh_ interface to guile -- remove uses of scm_ calls

* Finish C-level API review, renaming things, adding getters, etc

* Move scheme documentation into .scm files as doc strings

* Make sure that scwm and guile-gtk interoperate reasonably well;
provide some example uses of guile-gtk for scwm.
** ask-string implementation
** guile-gtk imitation of fvwm-buttons

* Do some more work on the window struct rewrite.

* Fix Perry Metzger's long-standing bug with all the timing-related
things on NetBSD.

* Improve the gravity handling stuff.
** Respect gravity on program resize
** Respect gravity on resize-to
** Let user get/set gravity.

* Fix up style handling a bit; make more convenient ways to match
styles only on one of resource class/resource instance/ window title,
and add convenient ways to match on certain other things.

* Promote generally useful things from flux.scm to somewhere supported

* bug fixes

* event rewrite

* decorations rewrite

* split into on-demand loaded modules of primitives

* Try some beta testing (although there won't be much time for
this). Personally make sure it builds and runs on Linux, NetBSD, Irix,
Solaris and SunOS (these being the platforms Maciej has easy access
to). These should be a good broad test, though. On each of this try
compiling and running with both guile 1.2 and the latest snap, and try
with and without threads.


Other Stuff

* Documentation stuff
** documentation strings in scwm scheme modules
** denoting user-options variables, and /**VAR markers
** extra sections in manual
*** high-level scwm introduction
*** command-line arguments
*** docs on scwmexec/scwmrepl, emacs interface
*** brief intro to scheme

* Organize and automate testing of scheme/tests/*.scm files
** can we use xlab? http://www.alphalink.com.au/~mvertes/xlab.html

* Constraint embedding
** consider using cleaner subclassing w/ partial wrap model, instead of C-like void pointers
** virtual desktop and sticky interaction with the constraint variables
** rubberband-resizing fixes -- generalization of the rubberband
** z-order stacking constraints to replace add-hoc stays-on-top, raisewindow, lowerwindow

* WM_ATTENTION patch for xterms (from Robert Bihlmeyer), integration with zsh instead?

* General cleanup
** more static function hidden behind modules
** fewer primitives that do work themselves
instead they should just process arguments and call C functions that do
the real work -- those C functions would then be the core of a WM library
** better naming conventions for these C-level functions
specifically, I'd like the non-primitive C-level functions to all start
with capital letters.  Obviously I prefer Hungarian!
** fewer global variables, fewer function static variables
** separation of of initialization work
separate init_MODULE which registers the SMOB, and
init_MODULE_LATER_WORK which needs to be called after all SMOB types
exist and the X11 connection and screen information have been
initialized.  (init_MODULE functions should ideally not have an order
dependence as they do now -- especially if it's not documented, as it
isn't now).

* Primitive for XGetCommand, XrmParseCommand, XrmGetResource (see AddWindow())

* Add checks about redefining keystrokes, if not already done

* only move mouse with moving window if a keyboard command, or forced to -- allow user to control this + update man page for menustyle animated

* accelerated mouse movements w/ keyboard shortcuts

* StayOnBottom style
** constraints will do this really cleanly

* Other useful primitives/procedures --08/02/98 gjb (inspired by GWM, other wms)
** (elapsed-time) ; get running time of scwm
** (meminfo) ; Return string describing memory usage information
** (current-screen), (screen-count)
** (list-of-screens) ; list of managed screens (multi-screen support is iffy?)
** (invert-color COLOR) ; return a new color by inverting COLOR
** (last-key) ; return last key pressed
** (keycode->keysym KEYCODE), (keysym->keycode KEYSYM)
** window closing hook? (upon removal of the window?)
** (rotate-cut-buffers)
** window-group feature (at scheme level)
** (save-yourself WINDOW) ; send ICCCM WM_SAVE_YOURSELF to window to update WM_COMMAND X property -- maybe in terms of a send-client-message primitive?
 - We should add proper X Session Management support instead of these, IMO
 - (needed for Hnome compliance anyway)
** (set-mouse-acceleration! ACCEL), (set-mouse-acceleration-threshold! PIXELS)
** (set-colormap-focus! WINDOW) -- rename set-colormap-focus! and colormap-focus to [set-]colormap-focus-policy
** (window-shaped? WINDOW)
** (with-window WINDOW) to make WINDOW be the implicit target of (get-window) primitive
** (window-client-size) (window-client-position) (window-client-borderwidth) ;dimensions for the client (application top-level window, not the wm frame) 
** (window-user-set-position? WIN), (window-user-set-size? WIN) ; tell if user specified position/size on command line
** (window-program-set-position? WIN), (window-program-set-size? WIN) ; tell if client programmatically specified position/size on command line
 - I thought I added these! Will fix ASAP - Maciej
** (windows-at-position X Y), (windows-at-virtual-position X Y)  ; return in stacking order 
 - Could just be an abstraction on top of get-stacking-order (see above) - MS
** visibility change hooks (fully-obscured, partially-obscured, unobscured) -- subsumed by event rewrite --08/07/98 gjb

** DONE ONES
*** (X-resource-get NAME CLASS), (X-resource-put NAME VALUE) --done 08/07/98 gjb
*** (window-client-machine-name WINDOW) ; name of host on which client is running -- done --08/05/98 gjb
*** (make-string-usable-for-resource-key STRING) ; replace [.*& ] with _'s -- use regexp --done [in flux] 08/05/98 gjb
*** (lower-window-below LOWERWINDOW BELOWWINDOW) ; lower LOWERWINDOW to just below BELOWWINDOW done --08/02/98 gjb
*** (raise-window-above RAISEWINDOW ABOVEWINDOW) ; (these two in terms of restack-windows) done --08/02/98 gjb
*** (color->string COLOR) ; return an X11 string representation for COLOR (e.g., #cc88cc) done --08/02/98 gjb
*** (get-wm-command WIN) ; get WM_COMMAND property (in terms of window-xproperty) -- done [in flux] 08/05/98 gjb

* Size/position window needs to be more dynamic, customizable

* administrative b.s.
** cvsweb
** gnats for problem reporting

* Memory profiling -- instrument NEW and FREE and keep track of
alloc/dealloc to see where the memory is going... guile support for this?

* getters for setter functions

* Better error handling system -- don't call scwm_error w/ a number!


* color scheme wrappers need reference counting; whole rewrite like image?

* replace ColorPair struct w/ scheme-bject based

* New event handling mechanism
** event objects?
** event binding objects?

* Menu functionality
** existence testing for menu items
** side images should have optional alignment to top, center, or bottom
** pie menus
** auto splitting
** sticky menus (like button-bar)
** cacade-menu vs. popup-menu
** make-menu-item, make-menu
** horizontal vs. vertical vs. matrix
** auto-cascade vs. auto-matrix when too long
** reverting mouse position when only keyboard used
** extra-information list of properties (e.g, options for drawing, behaviour)
** animation
** keyboard short cuts using the new event model
** smarter placement of menus that is aware of the context of the popup-menu (or give args to popup-menu so button decorations can do inform popup-menu of a left edge or right edge constraint)
** pinup menus?  e.g. like the button bars
** multi-columns?
** horizontal?

* Better error handling  -- this may be more of a guile problem
** more consistent use, especially abstractions for argument type checking
** keyword argument checking -- give me errors instead of silently failing
** get a line number!  -- done!
** Don't crash and burn so often -- done!
** keep trying on .scwmrc especially! -- done!

* New threads stuff & widget embedding -- GTk?

* Add a hook to the scwm_error handler routine passing the request error and event type; provide a module to make these human readable -- see X-error-describe

* scwm.h has some stuff that belongs in window.h; separate these out better

* add_window.c, borders.c seem to duplicate some functionality
** figure out what each should do and remove extraneous stuff
** modularize the window decorations as C functions

* figure out dynamic loading issues
** what is guile's support for this?
** test with the drawmenu.c functions
** menu objects should be able to specify a .o file containing the functions they want to use to do the drawing

* Write some graphical reconfiguration tools.

* Interactive move/resize should permit using a real color, not justan xor-value, as an option (hard w/o an overlay plane)

* Rename scwm/scwm directory to scwm/src

* Quote key feature -- like C-q in Emacs, C-v in shells

* rewrite of remaining copyrighted code  to allow release under GPL

* Undo feature?


* Done for scwm 0.8:

* Add a `get-stacking-order' primitive -- renamed `list-all-windows-in-stacking-order'
** returns the window list in the stacking order. done --08/03/98 gjb

* Make lsm file -- [needs final update of file size] done --08/04/98 gjb




* Done:

- Implement error reporting and output redirection for the scwmexec
protocol, and make setting the SCWMEXEC_REQWIN property safe against
race conditions; with these, scwmrepl should be a total replacement of
the --interactive option.

- get rid of sun-headers.h -- we should just include the proper files

- Opaque resize -- afterstep and others do this --07/25/98 gjb

- use placement function for window placement (suggested by Sam Steingold <sds@usa.net>)

- Make scwm work with automake, and libtool where appropriate; this
should make setting up loadable modules much easier.

- Clean out all of the artifacts of the FVWM function system.
  [ I think that stuff is all gone now - MS ]

- Respond to scwmsend-s via some reasonable iccm
  - libICE?
  - ToolTalk?
   [ both of these are way too complicated, the new X properties
     method is lightweight but should be able to support what
     we need - MS]

- legacy module interface -- see utilities/dev/fvwm2-pager-demo
   [ done, see the fvwm-module module - MS ]

- replace MyFont struct w/ scheme-object based -- font scheme wrappers
still use the MyFont garbage; clean this up [ done - MS ]

- Finish implementing (useful) Fvwm functions as Scheme procedures. 
[this is mostly the style, decor, desk and path stuff,
modules should be punted.]

- Make scwm work with autoconf.

- Synthetic mouse presses

- Synthetic key presses

- Animated window shades --gjb 11/9/97 


;;; Local Variables:
;;; eval: (require 'filladapt)
;;; eval: (hide-sublevels 1)
;;; 
