New file misc.h
[wmaker-crm.git] / src / funcs.h
blob1863d553f3d843651cbdbb9bf8ee469451102b90
1 /*
2 * Window Maker window manager
4 * Copyright (c) 1997-2003 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 along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef WMFUNCS_H_
22 #define WMFUNCS_H_
24 #include <sys/types.h>
25 #include <stdio.h>
27 #include "window.h"
28 #include "defaults.h"
29 #include "keybind.h"
31 typedef void (WCallBack)(void *cdata);
32 typedef void (WDeathHandler)(pid_t pid, unsigned int status, void *cdata);
34 void DispatchEvent(XEvent *event);
35 void UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action);
36 void OpenSwitchMenu(WScreen *scr, int x, int y, int keyboard);
37 void InitializeSwitchMenu(void);
38 void OpenWindowMenu(WWindow *wwin, int x, int y, int keyboard);
39 void OpenWindowMenu2(WWindow *wwin, int x, int y, int keyboard);
40 void OpenMiniwindowMenu(WWindow *wwin, int x, int y);
41 void CloseWindowMenu(WScreen *scr);
42 void DestroyWindowMenu(WScreen *scr);
43 void StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next, Bool class_only);
45 void wHackedGrabButton(unsigned int button, unsigned int modifiers,
46 Window grab_window, Bool owner_events,
47 unsigned int event_mask, int pointer_mode,
48 int keyboard_mode, Window confine_to, Cursor cursor);
50 WMagicNumber wAddDeathHandler(pid_t pid, WDeathHandler *callback, void *cdata);
52 Pixmap LoadIcon(WScreen *scr, char *path, char *mask, int title_height);
55 Bool IsDoubleClick(WScreen *scr, XEvent *event);
57 WWindow * NextToFocusAfter(WWindow *wwin);
58 WWindow * NextToFocusBefore(WWindow *wwin);
60 RImage * wGetImageForWindowName(WScreen *scr, char *winstance, char *wclass);
62 #ifdef NUMLOCK_HACK
63 void wHackedGrabKey(int keycode, unsigned int modifiers,
64 Window grab_window, Bool owner_events, int pointer_mode,
65 int keyboard_mode);
66 #endif
68 Bool GetCommandForPid(int pid, char ***argv, int *argc);
70 int getWVisualID(int screen);
71 #endif