Files
wmaker/src/funcs.h
T

160 lines
4.1 KiB
C
Raw Normal View History

1998-09-29 22:36:29 +00:00
/*
1998-10-21 14:43:47 +00:00
* Window Maker window manager
1998-09-29 22:36:29 +00:00
*
* Copyright (c) 1997, 1998 Alfredo K. Kojima
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef WMFUNCS_H_
#define WMFUNCS_H_
#include <sys/types.h>
#include <stdio.h>
#include "window.h"
typedef void (WCallBack)(void *cdata);
typedef void (WDeathHandler)(pid_t pid, unsigned int status, void *cdata);
1999-01-06 15:22:33 +00:00
void Shutdown(WShutdownMode mode);
1998-09-29 22:36:29 +00:00
void RestoreDesktop(WScreen *scr);
1998-11-23 11:32:19 +00:00
void Exit(int status);
void Restart(char *manager, Bool abortOnFailure);
1998-09-29 22:36:29 +00:00
void SetupEnvironment(WScreen *scr);
void DispatchEvent(XEvent *event);
1999-01-06 15:22:33 +00:00
#ifndef LITE
1998-09-29 22:36:29 +00:00
Bool wRootMenuPerformShortcut(XEvent *event);
void wRootMenuBindShortcuts(Window window);
void OpenRootMenu(WScreen *scr, int x, int y, int keyboard);
void OpenSwitchMenu(WScreen *scr, int x, int y, int keyboard);
1999-01-06 15:22:33 +00:00
#endif /* !LITE */
1998-09-29 22:36:29 +00:00
void OpenWindowMenu(WWindow *wwin, int x, int y, int keyboard);
1999-01-06 15:22:33 +00:00
void OpenMiniwindowMenu(WWindow *wwin, int x, int y);
1998-09-29 22:36:29 +00:00
void OpenWorkspaceMenu(WScreen *scr, int x, int y);
void CloseWindowMenu(WScreen *scr);
1999-01-06 15:22:33 +00:00
#ifdef LITE
#define UpdateSwitchMenu(a, b, c)
#define UpdateSwitchMenuWorkspace(a, b)
#else /*! LITE */
1998-09-29 22:36:29 +00:00
void UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action);
void UpdateSwitchMenuWorkspace(WScreen *scr, int workspace);
1999-01-06 15:22:33 +00:00
#endif /* !LITE */
1998-11-03 12:53:26 +00:00
WMagicNumber wAddDeathHandler(pid_t pid, WDeathHandler *callback, void *cdata);
1998-09-29 22:36:29 +00:00
void wColormapInstallForWindow(WScreen *scr, WWindow *wwin);
void wColormapInstallRoot(WScreen *scr);
void wColormapUninstallRoot(WScreen *scr);
1998-11-03 12:53:26 +00:00
void wColormapAllowClientInstallation(WScreen *scr, Bool starting);
1998-09-29 22:36:29 +00:00
Pixmap LoadIcon(WScreen *scr, char *path, char *mask, int title_height);
void PlaceIcon(WScreen *scr, int *x_ret, int *y_ret);
1998-10-23 17:07:08 +00:00
void PlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
unsigned int width, unsigned int height);
1998-09-29 22:36:29 +00:00
2000-04-07 22:47:04 +00:00
void StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next);
1998-09-29 22:36:29 +00:00
#ifdef USECPP
char *MakeCPPArgs(char *path);
#endif
char *ExpandOptions(WScreen *scr, char *cmdline);
1999-01-06 15:22:33 +00:00
void ExecuteShellCommand(WScreen *scr, char *command);
1999-10-20 03:25:06 +00:00
void StartLogShell(WScreen *scr);
1998-09-29 22:36:29 +00:00
Bool IsDoubleClick(WScreen *scr, XEvent *event);
2000-02-16 18:26:15 +00:00
WWindow *NextToFocusAfter(WWindow *wwin);
WWindow *NextToFocusBefore(WWindow *wwin);
1998-09-29 22:36:29 +00:00
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
char *ShrinkString(WMFont *font, char *string, int width);
1998-09-29 22:36:29 +00:00
1999-01-06 15:22:33 +00:00
char *FindImage(char *paths, char *file);
1998-09-29 22:36:29 +00:00
RImage*wGetImageForWindowName(WScreen *scr, char *winstance, char *wclass);
BOOL StringCompareHook(proplist_t pl1, proplist_t pl2);
int IsEof(FILE * stream); /* feof that stats pipes */
void ParseWindowName(proplist_t value, char **winstance, char **wclass,
char *where);
1999-01-06 15:22:33 +00:00
void SendHelperMessage(WScreen *scr, char type, int workspace, char *msg);
1998-09-29 22:36:29 +00:00
char *GetShortcutString(char *text);
1998-11-03 12:53:26 +00:00
char *EscapeWM_CLASS(char *name, char *class);
void UnescapeWM_CLASS(char *str, char **name, char **class);
1998-09-29 22:36:29 +00:00
#ifdef NUMLOCK_HACK
void wHackedGrabKey(int keycode, unsigned int modifiers,
Window grab_window, Bool owner_events, int pointer_mode,
int keyboard_mode);
1998-10-21 14:43:47 +00:00
#endif
1998-09-29 22:36:29 +00:00
void wHackedGrabButton(unsigned int button, unsigned int modifiers,
Window grab_window, Bool owner_events,
unsigned int event_mask, int pointer_mode,
int keyboard_mode, Window confine_to, Cursor cursor);
void ExecExitScript();
/****** I18N Wrapper for XFetchName,XGetIconName ******/
Bool wFetchName(Display *dpy, Window win, char **winname);
Bool wGetIconName(Display *dpy, Window win, char **iconname);
1999-09-16 02:58:56 +00:00
1998-09-29 22:36:29 +00:00
#endif