/* dock.h- built-in Dock module for WindowMaker
 * 
 *  WindowMaker window manager
 * 
 *  Copyright (c) 1997 Alfredo K. Kojima
 * 
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef WMDOCK_H_
#define WMDOCK_H_


#include "appicon.h"

typedef struct WDock {
    WScreen *screen_ptr;
    int x_pos, y_pos;		       /* position of the first icon */
    WAppIcon *first_icon;	       /* pointer to the first icon.
					must exist *all* the time */
    int icon_count;
    char on_right_side;
    char dock_level;
} WDock;


WDock *wDockCreate(WScreen *scr);

void wDockAttachIcon(WDock *dock, WAppIcon *icon);
int wDockSnapIcon(WDock *dock, WAppIcon *icon, int req_x, int req_y,
		  int *ret_x, int *ret_y, int redocking);

void wDockTrackWindowLaunch(WDock *dock, Window window);
void wDockTrackDeadProcess(WDock *dock, pid_t pid, unsigned char status);
WAppIcon *wDockFindIconFor(WDock *dock, Window window);
void wDockSaveState(WDock *dock, char *path);
void wDockRestoreState(WDock *dock, char *path);
void wDockDoAutoLaunch(WDock *dock);


#endif
