# Tracker.py Manpage

`Tracker.py` is a Python module that tracks changes to Fvwm windows. By feeding it every packet that the `Fvwm.py` module receives, your extension can maintain an accurate database of every window, and the entire desktop -- at least so far as Fvwm informs modules!

## Synopsis

### Classes

`Tracker`
  A class which tracks changes to Fvwm windows, by processing packets sent from Fvwm.
`Window`
  A class containing public instance variables describing the attributes of an Fvwm window.

## Class Descriptions

### `Tracker`

The `Tracker` class maintains a database of all the Fvwm windows, the module has been notified about. Typically you do not instantiate a `Tracker` object directly; instead, you get an instance by calling `FvwmModule.get_windowlist()` in the Fvwm.py module. This instance can then be fed any and all packets as they are read from Fvwm. This keeps the database up-to-date. The `Tracker` class contains the following useful methods and public instance variables:

`feed_pkt(pkt)`
  Feed a packet object to the `Tracker`. You can safely feed the tracker all packets, which will keep it's internal database up-to-date.
`window_count()`
  Returns the number of windows in the tracker's database.
`get_windows()`
  Returns a list of all windows in the database.
`get_window(db_entry)`
  Return the window indexed by `db_entry`, Fvwm's internal database entry index for the window.
`x`, `y`
  Fvwm's current viewport origin.
`desk`
  Fvwm's currently active desk number.
`max_x`, `max_y`
  The maximum allowed values of the coordinates of the upper-left hand corner of the viewport.

### `Window`

The `Window` class is essentially a record, with public instance variables that describe all known attributes about every tracked window. The instance variables are:

`name`
  The window's name.
`icon_name`
  The window's icon name.
`icon_file`
  The icon's file name.
`res_class`
  The window's resource class.
`res_name`
  The window's resource name.
`top_id`
  The application's top level window ID
`frame_id`
  The Fvwm frame window ID
`db_entry`
  Fvwm's internal database entry index for the window.
`x`, `y`, `width`, `height`
  The origin and size of the window
`desk`
  The desktop the window is currently on.
`flags`
  The window flags for the window.
`title_height`
  The window's title height.
`border_width`
  The window's border width.
`base_width`, `base height`
  The window's base width and height.
`resize_width_incr`, `resize_height_incr`
  The window's resize increment in both dimensions
`min_width`, `min_height`, `max_width`, `max_height`
  The limits of the window's size in both dimensions
`icon_x`, `icon_y`, `icon_width`, `icon_height`
  The icon's origin and size.
`icon_label_id`
  The icon's label window ID
`icon_pixmap_id`
  The icon's pixmap window ID
`gravity`
  The window's gravity
`text_color`
  The pixel value of the window's text color
`border_color`
  The pixel value of the window's border color

Last modified: Thu Dec 19 19:03:31 EST
© 1996 Barry A. Warsaw