2 * Window Maker window manager
4 * Copyright (c) 1997, 1998 Alfredo K. Kojima
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
25 #include <sys/types.h>
29 #ifdef DRAWSTRING_PLUGIN
33 typedef void (WCallBack
)(void *cdata
);
35 typedef void (WDeathHandler
)(pid_t pid
, unsigned int status
, void *cdata
);
37 void Shutdown(WShutdownMode mode
);
39 void RestoreDesktop(WScreen
*scr
);
41 void Exit(int status
);
43 void Restart(char *manager
, Bool abortOnFailure
);
45 void SetupEnvironment(WScreen
*scr
);
47 void DispatchEvent(XEvent
*event
);
51 Bool
wRootMenuPerformShortcut(XEvent
*event
);
53 void wRootMenuBindShortcuts(Window window
);
55 void OpenRootMenu(WScreen
*scr
, int x
, int y
, int keyboard
);
57 void OpenSwitchMenu(WScreen
*scr
, int x
, int y
, int keyboard
);
61 void OpenWindowMenu(WWindow
*wwin
, int x
, int y
, int keyboard
);
63 void OpenMiniwindowMenu(WWindow
*wwin
, int x
, int y
);
65 void OpenWorkspaceMenu(WScreen
*scr
, int x
, int y
);
67 void CloseWindowMenu(WScreen
*scr
);
71 #define UpdateSwitchMenu(a, b, c)
73 #define UpdateSwitchMenuWorkspace(a, b)
77 void UpdateSwitchMenu(WScreen
*scr
, WWindow
*wwin
, int action
);
79 void UpdateSwitchMenuWorkspace(WScreen
*scr
, int workspace
);
83 WMagicNumber
wAddDeathHandler(pid_t pid
, WDeathHandler
*callback
, void *cdata
);
85 void wColormapInstallForWindow(WScreen
*scr
, WWindow
*wwin
);
87 void wColormapInstallRoot(WScreen
*scr
);
89 void wColormapUninstallRoot(WScreen
*scr
);
91 void wColormapAllowClientInstallation(WScreen
*scr
, Bool starting
);
93 Pixmap
LoadIcon(WScreen
*scr
, char *path
, char *mask
, int title_height
);
95 void PlaceIcon(WScreen
*scr
, int *x_ret
, int *y_ret
);
97 void PlaceWindow(WWindow
*wwin
, int *x_ret
, int *y_ret
,
98 unsigned int width
, unsigned int height
);
101 void StartWindozeCycle(WWindow
*wwin
, XEvent
*event
, Bool next
);
103 void CycleWindow(WScreen
*scr
, Bool forward
);
106 char *MakeCPPArgs(char *path
);
109 char *ExpandOptions(WScreen
*scr
, char *cmdline
);
111 void ExecuteShellCommand(WScreen
*scr
, char *command
);
113 void StartLogShell(WScreen
*scr
);
115 Bool
IsDoubleClick(WScreen
*scr
, XEvent
*event
);
117 WWindow
*NextToFocusAfter(WWindow
*wwin
);
118 WWindow
*NextToFocusBefore(WWindow
*wwin
);
120 void SlideWindow(Window win
, int from_x
, int from_y
, int to_x
, int to_y
);
122 #ifdef DRAWSTRING_PLUGIN
123 char *ShrinkString(WMFont
*font
, char *string
, int width
, WFunction
*func
);
125 char *ShrinkString(WMFont
*font
, char *string
, int width
);
128 char *FindImage(char *paths
, char *file
);
130 RImage
*wGetImageForWindowName(WScreen
*scr
, char *winstance
, char *wclass
);
132 BOOL
StringCompareHook(proplist_t pl1
, proplist_t pl2
);
134 int IsEof(FILE * stream
); /* feof that stats pipes */
136 void ParseWindowName(proplist_t value
, char **winstance
, char **wclass
,
139 void SendHelperMessage(WScreen
*scr
, char type
, int workspace
, char *msg
);
141 char *GetShortcutString(char *text
);
143 char *EscapeWM_CLASS(char *name
, char *class);
145 void UnescapeWM_CLASS(char *str
, char **name
, char **class);
148 void wHackedGrabKey(int keycode
, unsigned int modifiers
,
149 Window grab_window
, Bool owner_events
, int pointer_mode
,
153 void wHackedGrabButton(unsigned int button
, unsigned int modifiers
,
154 Window grab_window
, Bool owner_events
,
155 unsigned int event_mask
, int pointer_mode
,
156 int keyboard_mode
, Window confine_to
, Cursor cursor
);
159 void ExecExitScript();
161 /****** I18N Wrapper for XFetchName,XGetIconName ******/
163 Bool
wFetchName(Display
*dpy
, Window win
, char **winname
);
164 Bool
wGetIconName(Display
*dpy
, Window win
, char **iconname
);