Allow relaunch with shortcut key.
[wmaker-crm.git] / src / dock.h
blobbe10095903ce311940c2eced873c1bef44f4d613
1 /* dock.h- built-in Dock module for WindowMaker
3 * Window Maker window manager
5 * Copyright (c) 1997-2003 Alfredo K. Kojima
6 * Copyright (c) 1998-2003 Dan Pascu
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef WMDOCK_H_
24 #define WMDOCK_H_
27 #include "appicon.h"
28 #include "funcs.h"
31 typedef struct WDock {
32 WScreen *screen_ptr;
33 int x_pos, y_pos; /* position of the first icon */
35 WAppIcon **icon_array; /* array of docked icons */
36 int max_icons;
38 int icon_count;
40 #define WM_DOCK 0
41 #define WM_CLIP 1
42 #define NORMAL_DOCK WM_DOCK
43 #define EXTENDED_DOCK WM_CLIP
44 int type;
46 WMagicNumber auto_expand_magic;
47 WMagicNumber auto_collapse_magic;
48 WMagicNumber auto_raise_magic;
49 WMagicNumber auto_lower_magic;
50 unsigned int auto_collapse:1; /* if clip auto-collapse itself */
51 unsigned int auto_raise_lower:1; /* if clip should raise/lower when
52 * entered/leaved */
53 unsigned int on_right_side:1;
54 unsigned int collapsed:1;
55 unsigned int mapped:1;
56 unsigned int lowered:1;
57 unsigned int attract_icons:1; /* If clip should attract app-icons */
59 unsigned int lclip_button_pushed:1;
60 unsigned int rclip_button_pushed:1;
62 struct WMenu *menu;
64 struct WDDomain *defaults;
65 } WDock;
71 WDock *wDockCreate(WScreen *scr, int type);
72 WDock *wDockRestoreState(WScreen *scr, WMPropList *dock_state, int type);
74 void wDockDestroy(WDock *dock);
75 void wDockHideIcons(WDock *dock);
76 void wDockShowIcons(WDock *dock);
77 void wDockLower(WDock *dock);
78 void wDockRaise(WDock *dock);
79 void wDockRaiseLower(WDock *dock);
80 void wDockSaveState(WScreen *scr, WMPropList *old_state);
82 Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y);
83 Bool wDockSnapIcon(WDock *dock, WAppIcon *icon, int req_x, int req_y,
84 int *ret_x, int *ret_y, int redocking);
85 Bool wDockFindFreeSlot(WDock *dock, int *req_x, int *req_y);
86 void wDockDetach(WDock *dock, WAppIcon *icon);
88 void wDockFinishLaunch(WDock *dock, WAppIcon *icon);
89 void wDockTrackWindowLaunch(WDock *dock, Window window);
90 WAppIcon *wDockFindIconForWindow(WDock *dock, Window window);
91 void wDockDoAutoLaunch(WDock *dock, int workspace);
92 void wDockLaunchWithState(WDock *dock, WAppIcon *btn, WSavedState *state);
94 #ifdef XDND
95 int wDockReceiveDNDDrop(WScreen *scr, XEvent *event);
96 #endif
98 void wClipIconPaint(WAppIcon *aicon);
99 void wClipSaveState(WScreen *scr);
100 WMPropList *wClipSaveWorkspaceState(WScreen *scr, int workspace);
101 WAppIcon *wClipRestoreState(WScreen *scr, WMPropList *clip_state);
103 void wClipUpdateForWorkspaceChange(WScreen *scr, int workspace);
105 RImage *wClipMakeTile(WScreen *scr, RImage *normalTile);
107 #define WO_FAILED 0
108 #define WO_NOT_APPLICABLE 1
109 #define WO_SUCCESS 2
111 int wClipMakeIconOmnipresent(WAppIcon *aicon, int omnipresent);
113 #endif