Files
wmaker/src/funcs.h
T

159 lines
4.4 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
2004-10-12 21:28:27 +00:00
*
2003-01-16 23:30:45 +00:00
* Copyright (c) 1997-2003 Alfredo K. Kojima
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
2004-10-12 21:28:27 +00:00
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1998-09-29 22:36:29 +00:00
* USA.
*/
#ifndef WMFUNCS_H_
#define WMFUNCS_H_
#include <sys/types.h>
#include <stdio.h>
#include "window.h"
#include "defaults.h"
1998-09-29 22:36:29 +00:00
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);
#ifdef LITE
#define UpdateSwitchMenu(a,b,c)
#else
void UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action);
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);
void InitializeSwitchMenu(void);
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);
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);
2003-06-06 04:11:00 +00:00
void PlaceIcon(WScreen *scr, int *x_ret, int *y_ret, int head);
1998-09-29 22:36:29 +00:00
int calcIntersectionArea(int x1, int y1, int w1, int h1,
2004-10-12 21:28:27 +00:00
int x2, int y2, int w2, int h2);
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
2002-02-20 15:01:44 +00:00
char *StrConcatDot(char *a, char *b);
1998-09-29 22:36:29 +00:00
char *ExpandOptions(WScreen *scr, char *cmdline);
1999-01-06 15:22:33 +00:00
void ExecuteShellCommand(WScreen *scr, char *command);
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);
void ParseWindowName(WMPropList *value, char **winstance, char **wclass,
1998-09-29 22:36:29 +00:00
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);
Bool UpdateDomainFile(WDDomain *domain);
1998-09-29 22:36:29 +00:00
#ifdef NUMLOCK_HACK
void wHackedGrabKey(int keycode, unsigned int modifiers,
2004-10-12 21:28:27 +00:00
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
2004-10-12 21:28:27 +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);
1998-09-29 22:36:29 +00:00
void ExecExitScript();
/****** I18N Wrapper for XFetchName,XGetIconName ******/
Bool wFetchName(Display *dpy, Window win, char **winname);
Bool wGetIconName(Display *dpy, Window win, char **iconname);
/* Free returned string it when done. (applies to the next 2 functions) */
char* GetCommandForWindow(Window win);
char* GetProgramNameForWindow(Window win);
Bool GetCommandForPid(int pid, char ***argv, int *argc);
1998-09-29 22:36:29 +00:00
#endif