Code update for Window Maker version 0.50.0
[wmaker-crm.git] / src / dock.h
blobff457b4845b73ba8883ad7dbe28f044460e2498f
1 /* dock.h- built-in Dock module for WindowMaker
2 *
3 * Window Maker window manager
4 *
5 * Copyright (c) 1997, 1998 Alfredo K. Kojima
6 *
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,
20 * 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_collapse_magic;
47 WMagicNumber auto_raise_magic;
48 WMagicNumber auto_lower_magic;
49 unsigned int auto_collapse:1; /* if clip auto-collapse itself */
50 unsigned int auto_raise_lower:1; /* if clip should raise/lower when
51 * entered/leaved */
52 unsigned int on_right_side:1;
53 unsigned int collapsed:1;
54 unsigned int mapped:1;
55 unsigned int lowered:1;
56 unsigned int attract_icons:1; /* If clip should attract app-icons */
57 unsigned int keep_attracted:1; /* if keep them when application exits*/
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, proplist_t 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);
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 wDockTrackWindowLaunch(WDock *dock, Window window);
89 WAppIcon *wDockFindIconFor(WDock *dock, Window window);
90 void wDockDoAutoLaunch(WDock *dock, int workspace);
91 void wDockLaunchWithState(WDock *dock, WAppIcon *btn, WSavedState *state);
93 #ifdef REDUCE_APPICONS
94 void wDockSimulateLaunch(WDock *dock, WAppIcon *btn);
95 #endif
97 #ifdef OFFIX_DND
98 int wDockReceiveDNDDrop(WScreen *scr, XEvent *event);
99 #endif
101 void wClipIconPaint(WAppIcon *aicon);
102 void wClipSaveState(WScreen *scr);
103 proplist_t wClipSaveWorkspaceState(WScreen *scr, int workspace);
104 WAppIcon* wClipRestoreState(WScreen *scr, proplist_t clip_state);
106 void wClipUpdateForWorkspaceChange(WScreen *scr, int workspace);
108 RImage *wClipMakeTile(WScreen *scr, RImage *normalTile);
110 #endif