From 9fc7dc7f5ea326c0cf66027d489fecd630e6b96c Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Sat, 28 Dec 2013 13:07:33 +0100 Subject: [PATCH] Header file tweaks and cosmetics. Primarily, don't include Xlib.h from other headers than xtypes.h. --- src/E.h | 3 --- src/aclass.h | 4 ++-- src/borders.h | 2 +- src/buttons.h | 2 +- src/container.h | 3 ++- src/eimage.h | 3 +-- src/events.c | 2 +- src/events.h | 2 +- src/focus.h | 5 +++-- src/grabs.c | 4 ++-- src/hints.h | 1 - src/hiwin.h | 5 +++-- src/x.c | 2 +- src/xprop.h | 2 +- src/xtypes.h | 4 +++- src/xwin.h | 3 +-- 16 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/E.h b/src/E.h index b336870d..f3fbc2a0 100644 --- a/src/E.h +++ b/src/E.h @@ -31,9 +31,6 @@ #include "lang.h" #include "sounds.h" #include "util.h" - -#include - #include "xtypes.h" #include diff --git a/src/aclass.h b/src/aclass.h index 6e8f1855..98285ed9 100644 --- a/src/aclass.h +++ b/src/aclass.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2008 Kim Woelders + * Copyright (C) 2004-2013 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -24,8 +24,8 @@ #ifndef _ACLASS_H #define _ACLASS_H -#include #include "etypes.h" +#include "xtypes.h" /* aclass.c */ int AclassConfigLoad(FILE * fs); diff --git a/src/borders.h b/src/borders.h index bb935902..22f0aec5 100644 --- a/src/borders.h +++ b/src/borders.h @@ -24,10 +24,10 @@ #ifndef _BORDERS_H_ #define _BORDERS_H_ -#include #include "eimage.h" #include "etypes.h" #include "list.h" +#include "xtypes.h" typedef struct { int min, max; diff --git a/src/buttons.h b/src/buttons.h index dd34c973..90d6f6b1 100644 --- a/src/buttons.h +++ b/src/buttons.h @@ -24,9 +24,9 @@ #ifndef _BUTTONS_H_ #define _BUTTONS_H_ -#include #include "eobj.h" #include "etypes.h" +#include "xtypes.h" typedef void (ButtonCbFunc) (void *prm, XEvent * ev, ActionClass * ac); diff --git a/src/container.h b/src/container.h index a297232f..a6f82072 100644 --- a/src/container.h +++ b/src/container.h @@ -24,9 +24,10 @@ #ifndef _CONTAINER_H_ #define _CONTAINER_H_ -#include #include "eimage.h" +#include "etypes.h" #include "list.h" +#include "xtypes.h" typedef struct _container Container; diff --git a/src/eimage.h b/src/eimage.h index 424ffb2d..31600ada 100644 --- a/src/eimage.h +++ b/src/eimage.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2009 Kim Woelders + * Copyright (C) 2004-2013 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -23,7 +23,6 @@ #ifndef _EIMAGE_H_ #define _EIMAGE_H_ -#include #include "xtypes.h" typedef void EImage; diff --git a/src/events.c b/src/events.c index c9d48799..a54ad13c 100644 --- a/src/events.c +++ b/src/events.c @@ -206,7 +206,7 @@ EInputQueryVersion(Display * dpy, return XIQueryVersion(dpy, major_version_return, minor_version_return); } -#include "X11/extensions/XInput.h" +#include static void ExtInitInput(int available) diff --git a/src/events.h b/src/events.h index 2d85bb17..78bf6608 100644 --- a/src/events.h +++ b/src/events.h @@ -23,7 +23,7 @@ #ifndef _EVENTS_H_ #define _EVENTS_H_ -#include +#include "xtypes.h" /* Re-mapped X-events */ #define EX_EVENT_CREATE_GONE 64 diff --git a/src/focus.h b/src/focus.h index 031b08ef..bee31f0a 100644 --- a/src/focus.h +++ b/src/focus.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2010 Kim Woelders + * Copyright (C) 2004-2013 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -24,7 +24,8 @@ #ifndef _FOCUS_H_ #define _FOCUS_H_ -#include +#include "etypes.h" +#include "xtypes.h" /* focus.c */ #define FOCUS_NOP 0 diff --git a/src/grabs.c b/src/grabs.c index 8986949b..b7d32396 100644 --- a/src/grabs.c +++ b/src/grabs.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors - * Copyright (C) 2004-2012 Kim Woelders + * Copyright (C) 2004-2013 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -26,7 +26,7 @@ #include "grabs.h" #include "xwin.h" #if USE_XI2 -#include "X11/extensions/XInput2.h" +#include #define DEV_PTR Mode.events.xi2_ptr #define DEV_KBD Mode.events.xi2_kbd #endif diff --git a/src/hints.h b/src/hints.h index 03836793..c09afa0d 100644 --- a/src/hints.h +++ b/src/hints.h @@ -24,7 +24,6 @@ #ifndef _HINTS_H_ #define _HINTS_H_ -#include #include "etypes.h" #include "xprop.h" #include "xwin.h" diff --git a/src/hiwin.h b/src/hiwin.h index 7628c741..522b0105 100644 --- a/src/hiwin.h +++ b/src/hiwin.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2008 Kim Woelders + * Copyright (C) 2005-2013 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -23,7 +23,8 @@ #ifndef _HIWIN_H_ #define _HIWIN_H_ -#include +#include "etypes.h" +#include "xtypes.h" typedef struct _hiwin Hiwin; diff --git a/src/x.c b/src/x.c index d8aaa6bf..30bfd52a 100644 --- a/src/x.c +++ b/src/x.c @@ -38,7 +38,7 @@ #include "eglx.h" #endif #if USE_XI2 -#include "X11/extensions/XInput2.h" +#include #endif #define DEBUG_XWIN 0 diff --git a/src/xprop.h b/src/xprop.h index 0f3acc43..0334b01d 100644 --- a/src/xprop.h +++ b/src/xprop.h @@ -85,7 +85,7 @@ void ex_window_prop_string_set(EX_Window win, EX_Atom atom, char *ex_window_prop_string_get(EX_Window win, EX_Atom atom); /* Misc. */ -#include "X11/Xatom.h" +#include extern EX_Atom atoms_icccm[]; #define EX_ATOM_UTF8_STRING atoms_icccm[8] diff --git a/src/xtypes.h b/src/xtypes.h index b7b06898..53b9ed1f 100644 --- a/src/xtypes.h +++ b/src/xtypes.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Kim Woelders + * Copyright (C) 2008-2013 Kim Woelders * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -23,6 +23,8 @@ #ifndef _XTYPES_H_ #define _XTYPES_H_ +#include + typedef struct _xwin *Win; #endif /* _XTYPES_H_ */ diff --git a/src/xwin.h b/src/xwin.h index 1464b4ef..ee4fa75d 100644 --- a/src/xwin.h +++ b/src/xwin.h @@ -24,7 +24,6 @@ #ifndef _XWIN_H_ #define _XWIN_H_ -#include #include "util.h" #include "xtypes.h" @@ -343,7 +342,7 @@ Pixmap EWindowGetPixmap(const Win win); #endif /* USE_COMPOSITE */ #if USE_XI2 -#include "X11/extensions/XInput2.h" +#include typedef struct { XIEventMask em;