From: "Rodolfo García Peñas (kix)" <[email protected]>
This is the new file misc.h, with the function prototypes for misc.c.
This file is created using misc.c and removing the prototypes from funcs.h
---
src/actions.c | 1 +
src/appicon.c | 1 +
src/client.c | 1 +
src/defaults.c | 1 +
src/dialog.c | 2 +-
src/dock.c | 1 +
src/dockedapp.c | 2 +-
src/event.c | 1 +
src/framewin.c | 2 +-
src/funcs.h | 26 --------------------------
src/icon.c | 2 +-
src/misc.c | 7 +++++--
src/misc.h | 45 +++++++++++++++++++++++++++++++++++++++++++++
src/rootmenu.c | 2 +-
src/session.c | 1 +
src/switchmenu.c | 2 +-
src/switchpanel.c | 2 +-
src/texture.c | 2 +-
src/wdefaults.c | 2 +-
src/window.c | 2 +-
src/winmenu.c | 2 +-
src/winspector.c | 2 +-
src/workspace.c | 2 +-
23 files changed, 70 insertions(+), 41 deletions(-)
create mode 100644 src/misc.h
diff --git a/src/actions.c b/src/actions.c
index 207ce4f..3fb3fe6 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -47,6 +47,7 @@
#include "xinerama.h"
#include "usermenu.h"
#include "placement.h"
+#include "misc.h"
/****** Global Variables ******/
diff --git a/src/appicon.c b/src/appicon.c
index 72fb3d0..d6d8164 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -48,6 +48,7 @@
#include "xinerama.h"
#include "client.h"
#include "placement.h"
+#include "misc.h"
#ifdef XDND
#include "xdnd.h"
#endif
diff --git a/src/client.c b/src/client.c
index cfe5181..e877229 100644
--- a/src/client.c
+++ b/src/client.c
@@ -42,6 +42,7 @@
#include "appicon.h"
#include "appmenu.h"
#include "wmspec.h"
+#include "misc.h"
/****** Global Variables ******/
diff --git a/src/defaults.c b/src/defaults.c
index 5300a23..53d8173 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -61,6 +61,7 @@
#include "dock.h"
#include "workspace.h"
#include "properties.h"
+#include "misc.h"
#define MAX_SHORTCUT_LENGTH 32
diff --git a/src/dialog.c b/src/dialog.c
index 6964495..91a3d83 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -52,7 +52,7 @@
#include "GNUstep.h"
#include "screen.h"
#include "dialog.h"
-#include "funcs.h"
+#include "misc.h"
#include "stacking.h"
#include "framewin.h"
#include "window.h"
diff --git a/src/dock.c b/src/dock.c
index 529b982..7f277c5 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -55,6 +55,7 @@
#include "superfluous.h"
#include "xinerama.h"
#include "placement.h"
+#include "misc.h"
/**** Local variables ****/
#define CLIP_REWIND 1
diff --git a/src/dockedapp.c b/src/dockedapp.c
index d7fc7b7..cc592e0 100644
--- a/src/dockedapp.c
+++ b/src/dockedapp.c
@@ -33,7 +33,7 @@
#include "dock.h"
#include "dockedapp.h"
#include "dialog.h"
-#include "funcs.h"
+#include "misc.h"
#include "defaults.h"
#include "framewin.h"
#include "xinerama.h"
diff --git a/src/event.c b/src/event.c
index 302497b..a8f71f7 100644
--- a/src/event.c
+++ b/src/event.c
@@ -70,6 +70,7 @@
#include "colormap.h"
#include "screen.h"
#include "shutdown.h"
+#include "misc.h"
/******** Global Variables **********/
extern XContext wWinContext;
diff --git a/src/framewin.c b/src/framewin.c
index fe6a1b2..39f55d6 100644
--- a/src/framewin.c
+++ b/src/framewin.c
@@ -39,7 +39,7 @@
#include "wcore.h"
#include "framewin.h"
#include "stacking.h"
-#include "funcs.h"
+#include "misc.h"
#define DBLCLICK_TIME wPreferences.dblclick_time
diff --git a/src/funcs.h b/src/funcs.h
index 7fb6958..1863d55 100644
--- a/src/funcs.h
+++ b/src/funcs.h
@@ -41,11 +41,6 @@ void OpenMiniwindowMenu(WWindow *wwin, int x, int y);
void CloseWindowMenu(WScreen *scr);
void DestroyWindowMenu(WScreen *scr);
void StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next, Bool
class_only);
-void SendHelperMessage(WScreen *scr, char type, int workspace, char *msg);
-void UnescapeWM_CLASS(char *str, char **name, char **class);
-
-void ParseWindowName(WMPropList *value, char **winstance, char **wclass,
- char *where);
void wHackedGrabButton(unsigned int button, unsigned int modifiers,
Window grab_window, Bool owner_events,
@@ -57,24 +52,11 @@ WMagicNumber wAddDeathHandler(pid_t pid, WDeathHandler
*callback, void *cdata);
Pixmap LoadIcon(WScreen *scr, char *path, char *mask, int title_height);
-char * StrConcatDot(char *a, char *b);
-char * ExpandOptions(WScreen *scr, char *cmdline);
-char * ShrinkString(WMFont *font, char *string, int width);
-char * FindImage(char *paths, char *file);
-char * GetShortcutString(char *text);
-char * GetShortcutKey(WShortKey key);
-char * EscapeWM_CLASS(char *name, char *class);
-
Bool IsDoubleClick(WScreen *scr, XEvent *event);
-Bool UpdateDomainFile(WDDomain *domain);
WWindow * NextToFocusAfter(WWindow *wwin);
WWindow * NextToFocusBefore(WWindow *wwin);
-void move_window(Window win, int from_x, int from_y, int to_x, int to_y);
-void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
-void SlideWindows(Window *wins[], int n, int from_x, int from_y, int to_x, int
to_y);
-
RImage * wGetImageForWindowName(WScreen *scr, char *winstance, char *wclass);
#ifdef NUMLOCK_HACK
@@ -83,14 +65,6 @@ void wHackedGrabKey(int keycode, unsigned int modifiers,
int keyboard_mode);
#endif
-/****** 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);
-
Bool GetCommandForPid(int pid, char ***argv, int *argc);
int getWVisualID(int screen);
diff --git a/src/icon.c b/src/icon.c
index 2d01341..e0ea97a 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -38,12 +38,12 @@
#include "window.h"
#include "icon.h"
#include "actions.h"
-#include "funcs.h"
#include "stacking.h"
#include "application.h"
#include "defaults.h"
#include "appicon.h"
#include "wmspec.h"
+#include "misc.h"
/**** Global varianebles ****/
extern WPreferences wPreferences;
diff --git a/src/misc.c b/src/misc.c
index 32d5659..ef35608 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -38,13 +38,13 @@
#include <WINGs/WUtil.h>
#include <wraster.h>
+#include "misc.h"
#include "WindowMaker.h"
#include "GNUstep.h"
#include "screen.h"
#include "wcore.h"
#include "window.h"
#include "framewin.h"
-#include "funcs.h"
#include "dialog.h"
#include "xutil.h"
#include "xmodifier.h"
@@ -53,6 +53,9 @@
extern WPreferences wPreferences;
#define ICON_SIZE wPreferences.icon_size
+/**** Local prototypes *****/
+static void UnescapeWM_CLASS(char *str, char **name, char **class);
+
/* XFetchName Wrapper */
Bool wFetchName(Display *dpy, Window win, char **winname)
{
@@ -862,7 +865,7 @@ char *EscapeWM_CLASS(char *name, char *class)
return ret;
}
-void UnescapeWM_CLASS(char *str, char **name, char **class)
+static void UnescapeWM_CLASS(char *str, char **name, char **class)
{
int i, j, k, dot;
diff --git a/src/misc.h b/src/misc.h
new file mode 100644
index 0000000..791bc59
--- /dev/null
+++ b/src/misc.h
@@ -0,0 +1,45 @@
+/*
+ * Window Maker window manager
+ *
+ * Copyright (c) 1997-2003 Alfredo K. Kojima
+ * Copyright (c) 2013 Window Maker Team
+ *
+ * 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.
+ */
+#ifndef WMMISC_H_
+#define WMMISC_H_
+
+#include "appicon.h"
+
+
+Bool wFetchName(Display *dpy, Window win, char **winname);
+Bool wGetIconName(Display *dpy, Window win, char **iconname);
+Bool UpdateDomainFile(WDDomain * domain);
+
+void move_window(Window win, int from_x, int from_y, int to_x, int to_y);
+void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
+void SlideWindows(Window *wins[], int n, int from_x, int from_y, int to_x, int
to_y);
+void ParseWindowName(WMPropList * value, char **winstance, char **wclass, char
*where);
+void SendHelperMessage(WScreen * scr, char type, int workspace, char *msg);
+
+char *ShrinkString(WMFont * font, char *string, int width);
+char *FindImage(char *paths, char *file);
+char *ExpandOptions(WScreen * scr, char *cmdline);
+char *GetShortcutString(char *text);
+char *GetShortcutKey(WShortKey key);
+char *EscapeWM_CLASS(char *name, char *class);
+char *StrConcatDot(char *a, char *b);
+char *GetCommandForWindow(Window win);
+#endif
diff --git a/src/rootmenu.c b/src/rootmenu.c
index 5b8ff90..db81212 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -41,7 +41,7 @@
#include "WindowMaker.h"
#include "actions.h"
#include "menu.h"
-#include "funcs.h"
+#include "misc.h"
#include "main.h"
#include "dialog.h"
#include "keybind.h"
diff --git a/src/session.c b/src/session.c
index 065e769..c4ba5af 100644
--- a/src/session.c
+++ b/src/session.c
@@ -81,6 +81,7 @@
#include "application.h"
#include "appicon.h"
#include "dock.h"
+#include "misc.h"
#include <WINGs/WUtil.h>
diff --git a/src/switchmenu.c b/src/switchmenu.c
index 6569252..a890bbb 100644
--- a/src/switchmenu.c
+++ b/src/switchmenu.c
@@ -33,7 +33,7 @@
#include "window.h"
#include "actions.h"
#include "client.h"
-#include "funcs.h"
+#include "misc.h"
#include "stacking.h"
#include "workspace.h"
#include "framewin.h"
diff --git a/src/switchpanel.c b/src/switchpanel.c
index fcd61fa..4ad9b8c 100644
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -31,7 +31,7 @@
#include "window.h"
#include "defaults.h"
#include "switchpanel.h"
-#include "funcs.h"
+#include "misc.h"
#include "xinerama.h"
extern Atom _XA_WM_IGNORE_FOCUS_EVENTS;
diff --git a/src/texture.c b/src/texture.c
index a29406a..47258a5 100644
--- a/src/texture.c
+++ b/src/texture.c
@@ -31,7 +31,7 @@
#include "WindowMaker.h"
#include "texture.h"
-#include "funcs.h"
+#include "misc.h"
extern WPreferences wPreferences;
diff --git a/src/wdefaults.c b/src/wdefaults.c
index ce9af5f..f71a8dd 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -38,10 +38,10 @@
#include "window.h"
#include "appicon.h"
#include "screen.h"
-#include "funcs.h"
#include "workspace.h"
#include "defaults.h"
#include "icon.h"
+#include "misc.h"
#define APPLY_VAL(value, flag, attrib) \
if (value) {attr->flag = getBool(attrib, value); \
diff --git a/src/window.c b/src/window.c
index c227b4c..9ac5e78 100644
--- a/src/window.c
+++ b/src/window.c
@@ -49,7 +49,6 @@
#include "properties.h"
#include "actions.h"
#include "client.h"
-#include "funcs.h"
#include "colormap.h"
#include "keybind.h"
#include "stacking.h"
@@ -61,6 +60,7 @@
#include "superfluous.h"
#include "rootmenu.h"
#include "placement.h"
+#include "misc.h"
#ifdef MWM_HINTS
# include "motif.h"
diff --git a/src/winmenu.c b/src/winmenu.c
index 7d49d2b..aa2bb24 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -38,7 +38,7 @@
#include "client.h"
#include "application.h"
#include "keybind.h"
-#include "funcs.h"
+#include "misc.h"
#include "framewin.h"
#include "workspace.h"
#include "winspector.h"
diff --git a/src/winspector.c b/src/winspector.c
index 08066da..41d3afb 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -35,7 +35,6 @@
#include "framewin.h"
#include "window.h"
#include "workspace.h"
-#include "funcs.h"
#include "defaults.h"
#include "dialog.h"
#include "icon.h"
@@ -47,6 +46,7 @@
#include "dock.h"
#include "client.h"
#include "wmspec.h"
+#include "misc.h"
#include <WINGs/WUtil.h>
diff --git a/src/workspace.c b/src/workspace.c
index 8b24087..b4cccd0 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -39,7 +39,7 @@
#include "framewin.h"
#include "window.h"
#include "icon.h"
-#include "funcs.h"
+#include "misc.h"
#include "menu.h"
#include "application.h"
#include "dock.h"
--
1.7.10.4
--
To unsubscribe, send mail to [email protected].