Files
wmaker/src/dock.h
T

131 lines
4.1 KiB
C
Raw Normal View History

1998-09-29 22:36:29 +00:00
/* dock.h- built-in Dock module for WindowMaker
2004-10-12 21:28:27 +00:00
*
1998-10-21 14:43:47 +00:00
* Window Maker window manager
2004-10-12 21:28:27 +00:00
*
2003-01-16 23:30:45 +00:00
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
2004-10-12 21:28:27 +00:00
*
1998-09-29 22:36:29 +00:00
* 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.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1998-09-29 22:36:29 +00:00
*/
#ifndef WMDOCK_H_
#define WMDOCK_H_
#include "appicon.h"
#include "funcs.h"
typedef struct WDock {
WScreen *screen_ptr;
int x_pos, y_pos; /* position of the first icon */
WAppIcon **icon_array; /* array of docked icons */
int max_icons;
int icon_count;
#define WM_DOCK 0
#define WM_CLIP 1
2013-04-12 01:42:41 +02:00
#define WM_DRAWER 2
1998-09-29 22:36:29 +00:00
int type;
WMagicNumber auto_expand_magic;
1998-09-29 22:36:29 +00:00
WMagicNumber auto_collapse_magic;
1999-01-06 15:22:33 +00:00
WMagicNumber auto_raise_magic;
WMagicNumber auto_lower_magic;
1998-09-29 22:36:29 +00:00
unsigned int auto_collapse:1; /* if clip auto-collapse itself */
1999-01-06 15:22:33 +00:00
unsigned int auto_raise_lower:1; /* if clip should raise/lower when
* entered/leaved */
1998-09-29 22:36:29 +00:00
unsigned int on_right_side:1;
unsigned int collapsed:1;
unsigned int mapped:1;
unsigned int lowered:1;
unsigned int attract_icons:1; /* If clip should attract app-icons */
unsigned int lclip_button_pushed:1;
unsigned int rclip_button_pushed:1;
2004-10-12 21:28:27 +00:00
1998-09-29 22:36:29 +00:00
struct WMenu *menu;
struct WDDomain *defaults;
} WDock;
2013-04-12 01:42:41 +02:00
WDock *wDockCreate(WScreen *scr, int type, char *name);
WDock *wDockRestoreState(WScreen *scr, WMPropList *dock_state, int type);
1998-09-29 22:36:29 +00:00
void wDockDestroy(WDock *dock);
void wDockHideIcons(WDock *dock);
void wDockShowIcons(WDock *dock);
void wDockLower(WDock *dock);
void wDockRaise(WDock *dock);
void wDockRaiseLower(WDock *dock);
void wDockSaveState(WScreen *scr, WMPropList *old_state);
1998-09-29 22:36:29 +00:00
2012-11-10 20:25:10 +01:00
Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y, Bool update_icon);
1998-11-23 11:32:19 +00:00
Bool wDockSnapIcon(WDock *dock, WAppIcon *icon, int req_x, int req_y,
2004-10-12 21:28:27 +00:00
int *ret_x, int *ret_y, int redocking);
1998-11-23 11:32:19 +00:00
Bool wDockFindFreeSlot(WDock *dock, int *req_x, int *req_y);
1998-09-29 22:36:29 +00:00
void wDockDetach(WDock *dock, WAppIcon *icon);
Bool wDockMoveIconBetweenDocks(WDock *src, WDock *dest, WAppIcon *icon, int x, int y);
void wDockReattachIcon(WDock *dock, WAppIcon *icon, int x, int y);
1998-09-29 22:36:29 +00:00
2013-04-12 01:42:41 +02:00
void wSlideAppicons(WAppIcon **appicons, int n, int to_the_left);
void wDrawerFillTheGap(WDock *drawer, WAppIcon *aicon, Bool redocking);
void wDockFinishLaunch(WDock *dock, WAppIcon *icon);
1998-09-29 22:36:29 +00:00
void wDockTrackWindowLaunch(WDock *dock, Window window);
1999-12-01 00:43:24 +00:00
WAppIcon *wDockFindIconForWindow(WDock *dock, Window window);
1998-09-29 22:36:29 +00:00
void wDockDoAutoLaunch(WDock *dock, int workspace);
void wDockLaunchWithState(WDock *dock, WAppIcon *btn, WSavedState *state);
2004-10-13 05:09:08 +00:00
#ifdef XDND
1998-09-29 22:36:29 +00:00
int wDockReceiveDNDDrop(WScreen *scr, XEvent *event);
#endif
void wClipIconPaint(WAppIcon *aicon);
void wClipSaveState(WScreen *scr);
WMPropList *wClipSaveWorkspaceState(WScreen *scr, int workspace);
WAppIcon *wClipRestoreState(WScreen *scr, WMPropList *clip_state);
1998-09-29 22:36:29 +00:00
2013-04-12 01:42:41 +02:00
void wDrawerIconPaint(WAppIcon *dicon);
void wDrawersSaveState(WScreen *scr);
void wDrawersRestoreState(WScreen *scr);
int wIsADrawer(WScreen *scr, WAppIcon *aicon);
1998-09-29 22:36:29 +00:00
void wClipUpdateForWorkspaceChange(WScreen *scr, int workspace);
RImage *wClipMakeTile(WScreen *scr, RImage *normalTile);
2013-04-12 01:42:41 +02:00
RImage* wDrawerMakeTile(WScreen *scr, RImage *normalTile);
1998-09-29 22:36:29 +00:00
#define WO_FAILED 0
#define WO_NOT_APPLICABLE 1
#define WO_SUCCESS 2
2013-04-12 01:42:41 +02:00
typedef enum
{
P_NORMAL = 0,
P_AUTO_RAISE_LOWER,
P_KEEP_ON_TOP,
} dockPosition;
int wClipMakeIconOmnipresent(WAppIcon *aicon, int omnipresent);
1998-09-29 22:36:29 +00:00
#endif