From 5455a585dc86cebd666ea41499519ea18e6172f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Wed, 15 May 2013 13:07:57 +0200 Subject: [PATCH] funcs.h removed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The file funcs.h is removed. A new file osdep.h is created to hold the definition for all osdep_*c files. The files .c has been adjusted to include the right header files, removing funcs.h, including osdep.h. Signed-off-by: Rodolfo García Peñas (kix) --- src/Makefile.am | 2 +- src/application.c | 1 + src/appmenu.c | 1 - src/balloon.c | 2 +- src/dialog.c | 1 + src/dock.c | 1 + src/dock.h | 3 --- src/dockedapp.c | 1 + src/event.h | 2 ++ src/framewin.c | 1 + src/icon.h | 1 - src/main.c | 2 +- src/misc.c | 1 + src/misc.h | 3 ++- src/monitor.c | 1 - src/motif.c | 1 - src/moveres.c | 1 - src/{funcs.h => osdep.h} | 17 ++--------------- src/osdep_bsd.c | 2 +- src/osdep_darwin.c | 2 +- src/osdep_linux.c | 2 +- src/osdep_stub.c | 2 +- src/placement.c | 1 - src/screen.c | 2 +- src/shutdown.c | 1 - src/stacking.c | 1 - src/texture.c | 1 + src/window.c | 1 + 28 files changed, 22 insertions(+), 35 deletions(-) rename src/{funcs.h => osdep.h} (72%) diff --git a/src/Makefile.am b/src/Makefile.am index 3df67420..41a7e83e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -41,7 +41,7 @@ wmaker_SOURCES = \ framewin.h \ geomview.c \ geomview.h \ - funcs.h \ + osdep.h \ icon.c \ icon.h \ keybind.h \ diff --git a/src/application.c b/src/application.c index abe1d2d7..1bb08901 100644 --- a/src/application.c +++ b/src/application.c @@ -35,6 +35,7 @@ #include "properties.h" #include "workspace.h" #include "dock.h" +#include "defaults.h" /******** Global variables ********/ diff --git a/src/appmenu.c b/src/appmenu.c index 0d6c7f43..343797b4 100644 --- a/src/appmenu.c +++ b/src/appmenu.c @@ -33,7 +33,6 @@ #include "WindowMaker.h" #include "menu.h" #include "actions.h" -#include "funcs.h" #include "appmenu.h" #include "framewin.h" diff --git a/src/balloon.c b/src/balloon.c index c00375ab..a904fe04 100644 --- a/src/balloon.c +++ b/src/balloon.c @@ -22,6 +22,7 @@ #ifdef BALLOON_TEXT +#include #include #include #ifdef SHAPED_BALLOON @@ -39,7 +40,6 @@ #include "framewin.h" #include "icon.h" #include "appicon.h" -#include "funcs.h" #include "workspace.h" #include "balloon.h" diff --git a/src/dialog.c b/src/dialog.c index 2c2e5d3f..11d03250 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -51,6 +51,7 @@ #include "WindowMaker.h" #include "GNUstep.h" #include "screen.h" +#include "window.h" #include "dialog.h" #include "misc.h" #include "stacking.h" diff --git a/src/dock.c b/src/dock.c index 15d1679b..b29fe62e 100644 --- a/src/dock.c +++ b/src/dock.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/src/dock.h b/src/dock.h index 2c6c4bc4..ffebb1e7 100644 --- a/src/dock.h +++ b/src/dock.h @@ -23,10 +23,7 @@ #ifndef WMDOCK_H_ #define WMDOCK_H_ - #include "appicon.h" -#include "funcs.h" - typedef struct WDock { WScreen *screen_ptr; diff --git a/src/dockedapp.c b/src/dockedapp.c index cc592e0d..0ef180f1 100644 --- a/src/dockedapp.c +++ b/src/dockedapp.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "WindowMaker.h" #include "window.h" diff --git a/src/event.h b/src/event.h index 33a7a054..cfc245d4 100644 --- a/src/event.h +++ b/src/event.h @@ -22,6 +22,8 @@ #ifndef WMEVENT_H #define WMEVENT_H +typedef void (WDeathHandler)(pid_t pid, unsigned int status, void *cdata); + void EventLoop(void); void DispatchEvent(XEvent *event); void ProcessPendingEvents(void); diff --git a/src/framewin.c b/src/framewin.c index 40fd2a35..7304da79 100644 --- a/src/framewin.c +++ b/src/framewin.c @@ -37,6 +37,7 @@ #include "resources.h" #include "screen.h" #include "wcore.h" +#include "window.h" #include "framewin.h" #include "stacking.h" #include "misc.h" diff --git a/src/icon.h b/src/icon.h index 368696f0..e2c7d91b 100644 --- a/src/icon.h +++ b/src/icon.h @@ -24,7 +24,6 @@ #include "wcore.h" #include "window.h" -#include "funcs.h" #define TILE_NORMAL 0 #define TILE_CLIP 1 diff --git a/src/main.c b/src/main.c index c0878040..a0c096e3 100644 --- a/src/main.c +++ b/src/main.c @@ -45,7 +45,7 @@ #include "WindowMaker.h" #include "window.h" -#include "funcs.h" +#include "defaults.h" #include "event.h" #include "startup.h" #include "menu.h" diff --git a/src/misc.c b/src/misc.c index a791a4a3..6b3336d9 100644 --- a/src/misc.c +++ b/src/misc.c @@ -38,6 +38,7 @@ #include #include +#include "window.h" #include "misc.h" #include "WindowMaker.h" #include "GNUstep.h" diff --git a/src/misc.h b/src/misc.h index 791bc592..39b4d328 100644 --- a/src/misc.h +++ b/src/misc.h @@ -21,9 +21,10 @@ #ifndef WMMISC_H_ #define WMMISC_H_ +#include "defaults.h" +#include "keybind.h" #include "appicon.h" - Bool wFetchName(Display *dpy, Window win, char **winname); Bool wGetIconName(Display *dpy, Window win, char **iconname); Bool UpdateDomainFile(WDDomain * domain); diff --git a/src/monitor.c b/src/monitor.c index 22eaaa9e..d33372dd 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -38,7 +38,6 @@ #include "window.h" #include "dialog.h" #include "main.h" -#include "funcs.h" /****** Global Variables ******/ extern WPreferences wPreferences; diff --git a/src/motif.c b/src/motif.c index 9db9db87..5fca916b 100644 --- a/src/motif.c +++ b/src/motif.c @@ -35,7 +35,6 @@ #include "properties.h" #include "icon.h" #include "client.h" -#include "funcs.h" #include "motif.h" /* Motif window hints */ diff --git a/src/moveres.c b/src/moveres.c index 8f0ecbab..3984906f 100644 --- a/src/moveres.c +++ b/src/moveres.c @@ -34,7 +34,6 @@ #include "client.h" #include "icon.h" #include "dock.h" -#include "funcs.h" #include "actions.h" #include "workspace.h" #include "placement.h" diff --git a/src/funcs.h b/src/osdep.h similarity index 72% rename from src/funcs.h rename to src/osdep.h index 1eb5d782..485995c3 100644 --- a/src/funcs.h +++ b/src/osdep.h @@ -18,21 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef WMFUNCS_H_ -#define WMFUNCS_H_ - -#include -#include - -#include "window.h" -#include "defaults.h" -#include "keybind.h" - -typedef void (WCallBack)(void *cdata); -typedef void (WDeathHandler)(pid_t pid, unsigned int status, void *cdata); - - -/* ---[ osdep_*.c ]------------------------------------------------------- */ +#ifndef WMOSDEP_H_ +#define WMOSDEP_H_ Bool GetCommandForPid(int pid, char ***argv, int *argc); diff --git a/src/osdep_bsd.c b/src/osdep_bsd.c index e92a7c8f..33932409 100644 --- a/src/osdep_bsd.c +++ b/src/osdep_bsd.c @@ -32,7 +32,7 @@ #include #include "wconfig.h" -#include "funcs.h" +#include "osdep.h" /* * copy argc and argv for an existing process identified by `pid' diff --git a/src/osdep_darwin.c b/src/osdep_darwin.c index 04ece9f6..b3a7b4fa 100644 --- a/src/osdep_darwin.c +++ b/src/osdep_darwin.c @@ -9,7 +9,7 @@ #include #include "wconfig.h" -#include "funcs.h" +#include "osdep.h" /* * copy argc and argv for an existing process identified by `pid' diff --git a/src/osdep_linux.c b/src/osdep_linux.c index 1336d2f8..6d246e5c 100644 --- a/src/osdep_linux.c +++ b/src/osdep_linux.c @@ -12,7 +12,7 @@ #include #include "wconfig.h" -#include "funcs.h" +#include "osdep.h" #define RETRY( x ) do { \ diff --git a/src/osdep_stub.c b/src/osdep_stub.c index d0349cda..18b170c4 100644 --- a/src/osdep_stub.c +++ b/src/osdep_stub.c @@ -4,7 +4,7 @@ #include #include "wconfig.h" -#include "funcs.h" +#include "osdep.h" Bool GetCommandForPid(int pid, char ***argv, int *argc) { diff --git a/src/placement.c b/src/placement.c index 1e707094..a445ec17 100644 --- a/src/placement.c +++ b/src/placement.c @@ -34,7 +34,6 @@ #include "icon.h" #include "appicon.h" #include "actions.h" -#include "funcs.h" #include "application.h" #include "dock.h" #include "xinerama.h" diff --git a/src/screen.c b/src/screen.c index c61aa1f7..90b54450 100644 --- a/src/screen.c +++ b/src/screen.c @@ -45,7 +45,7 @@ #include "texture.h" #include "pixmap.h" #include "menu.h" -#include "funcs.h" +#include "window.h" #include "main.h" #include "actions.h" #include "properties.h" diff --git a/src/shutdown.c b/src/shutdown.c index 67c39abd..23f02ac0 100644 --- a/src/shutdown.c +++ b/src/shutdown.c @@ -30,7 +30,6 @@ #include "WindowMaker.h" #include "window.h" #include "client.h" -#include "funcs.h" #include "main.h" #include "properties.h" #include "session.h" diff --git a/src/stacking.c b/src/stacking.c index 890e4d1f..f28e5b3e 100644 --- a/src/stacking.c +++ b/src/stacking.c @@ -30,7 +30,6 @@ #include "WindowMaker.h" #include "screen.h" #include "window.h" -#include "funcs.h" #include "actions.h" #include "properties.h" #include "stacking.h" diff --git a/src/texture.c b/src/texture.c index 47258a55..b7ddf894 100644 --- a/src/texture.c +++ b/src/texture.c @@ -31,6 +31,7 @@ #include "WindowMaker.h" #include "texture.h" +#include "window.h" #include "misc.h" extern WPreferences wPreferences; diff --git a/src/window.c b/src/window.c index 5b42d0cf..eb722238 100644 --- a/src/window.c +++ b/src/window.c @@ -63,6 +63,7 @@ #include "misc.h" #include "startup.h" #include "winmenu.h" +#include "osdep.h" #ifdef MWM_HINTS # include "motif.h"