1 /* dock.h- built-in Dock module for WindowMaker
3 * Window Maker window manager
5 * Copyright (c) 1997, 1998 Alfredo K. Kojima
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
31 typedef struct WDock
{
33 int x_pos
, y_pos
; /* position of the first icon */
35 WAppIcon
**icon_array
; /* array of docked icons */
42 #define NORMAL_DOCK WM_DOCK
43 #define EXTENDED_DOCK WM_CLIP
46 WMagicNumber auto_collapse_magic
;
47 unsigned int auto_collapse
:1; /* if clip auto-collapse itself */
48 unsigned int on_right_side
:1;
49 unsigned int collapsed
:1;
50 unsigned int mapped
:1;
51 unsigned int lowered
:1;
52 unsigned int attract_icons
:1; /* If clip should attract app-icons */
53 unsigned int keep_attracted
:1; /* if keep them when application exits*/
55 unsigned int lclip_button_pushed
:1;
56 unsigned int rclip_button_pushed
:1;
60 struct WDDomain
*defaults
;
67 WDock
*wDockCreate(WScreen
*scr
, int type
);
68 WDock
*wDockRestoreState(WScreen
*scr
, proplist_t dock_state
, int type
);
70 void wDockDestroy(WDock
*dock
);
71 void wDockHideIcons(WDock
*dock
);
72 void wDockShowIcons(WDock
*dock
);
73 void wDockLower(WDock
*dock
);
74 void wDockRaise(WDock
*dock
);
75 void wDockRaiseLower(WDock
*dock
);
76 void wDockSaveState(WScreen
*scr
);
78 Bool
wDockAttachIcon(WDock
*dock
, WAppIcon
*icon
, int x
, int y
);
79 int wDockSnapIcon(WDock
*dock
, WAppIcon
*icon
, int req_x
, int req_y
,
80 int *ret_x
, int *ret_y
, int redocking
);
81 int wDockFindFreeSlot(WDock
*dock
, int *req_x
, int *req_y
);
82 void wDockDetach(WDock
*dock
, WAppIcon
*icon
);
84 void wDockTrackWindowLaunch(WDock
*dock
, Window window
);
85 WAppIcon
*wDockFindIconFor(WDock
*dock
, Window window
);
86 void wDockDoAutoLaunch(WDock
*dock
, int workspace
);
87 void wDockLaunchWithState(WDock
*dock
, WAppIcon
*btn
, WSavedState
*state
);
89 #ifdef REDUCE_APPICONS
90 void wDockSimulateLaunch(WDock
*dock
, WAppIcon
*btn
);
94 int wDockReceiveDNDDrop(WScreen
*scr
, XEvent
*event
);
97 void wClipIconPaint(WAppIcon
*aicon
);
98 void wClipSaveState(WScreen
*scr
);
99 proplist_t
wClipSaveWorkspaceState(WScreen
*scr
, int workspace
);
100 WAppIcon
* wClipRestoreState(WScreen
*scr
, proplist_t clip_state
);
102 void wClipUpdateForWorkspaceChange(WScreen
*scr
, int workspace
);
104 RImage
*wClipMakeTile(WScreen
*scr
, RImage
*normalTile
);