Header file tweaks and cosmetics.

Primarily, don't include Xlib.h from other headers than xtypes.h.
This commit is contained in:
Kim Woelders 2013-12-28 13:07:33 +01:00
parent 8afc7eca2e
commit 9fc7dc7f5e
16 changed files with 23 additions and 24 deletions

View File

@ -31,9 +31,6 @@
#include "lang.h" #include "lang.h"
#include "sounds.h" #include "sounds.h"
#include "util.h" #include "util.h"
#include <X11/X.h>
#include "xtypes.h" #include "xtypes.h"
#include <stdio.h> #include <stdio.h>

View File

@ -1,6 +1,6 @@
/* /*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors * 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 * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
@ -24,8 +24,8 @@
#ifndef _ACLASS_H #ifndef _ACLASS_H
#define _ACLASS_H #define _ACLASS_H
#include <X11/Xlib.h>
#include "etypes.h" #include "etypes.h"
#include "xtypes.h"
/* aclass.c */ /* aclass.c */
int AclassConfigLoad(FILE * fs); int AclassConfigLoad(FILE * fs);

View File

@ -24,10 +24,10 @@
#ifndef _BORDERS_H_ #ifndef _BORDERS_H_
#define _BORDERS_H_ #define _BORDERS_H_
#include <X11/Xlib.h>
#include "eimage.h" #include "eimage.h"
#include "etypes.h" #include "etypes.h"
#include "list.h" #include "list.h"
#include "xtypes.h"
typedef struct { typedef struct {
int min, max; int min, max;

View File

@ -24,9 +24,9 @@
#ifndef _BUTTONS_H_ #ifndef _BUTTONS_H_
#define _BUTTONS_H_ #define _BUTTONS_H_
#include <X11/Xlib.h>
#include "eobj.h" #include "eobj.h"
#include "etypes.h" #include "etypes.h"
#include "xtypes.h"
typedef void (ButtonCbFunc) (void *prm, XEvent * ev, ActionClass * ac); typedef void (ButtonCbFunc) (void *prm, XEvent * ev, ActionClass * ac);

View File

@ -24,9 +24,10 @@
#ifndef _CONTAINER_H_ #ifndef _CONTAINER_H_
#define _CONTAINER_H_ #define _CONTAINER_H_
#include <X11/Xlib.h>
#include "eimage.h" #include "eimage.h"
#include "etypes.h"
#include "list.h" #include "list.h"
#include "xtypes.h"
typedef struct _container Container; typedef struct _container Container;

View File

@ -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 * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
@ -23,7 +23,6 @@
#ifndef _EIMAGE_H_ #ifndef _EIMAGE_H_
#define _EIMAGE_H_ #define _EIMAGE_H_
#include <X11/X.h>
#include "xtypes.h" #include "xtypes.h"
typedef void EImage; typedef void EImage;

View File

@ -206,7 +206,7 @@ EInputQueryVersion(Display * dpy,
return XIQueryVersion(dpy, major_version_return, minor_version_return); return XIQueryVersion(dpy, major_version_return, minor_version_return);
} }
#include "X11/extensions/XInput.h" #include <X11/extensions/XInput.h>
static void static void
ExtInitInput(int available) ExtInitInput(int available)

View File

@ -23,7 +23,7 @@
#ifndef _EVENTS_H_ #ifndef _EVENTS_H_
#define _EVENTS_H_ #define _EVENTS_H_
#include <X11/Xlib.h> #include "xtypes.h"
/* Re-mapped X-events */ /* Re-mapped X-events */
#define EX_EVENT_CREATE_GONE 64 #define EX_EVENT_CREATE_GONE 64

View File

@ -1,6 +1,6 @@
/* /*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors * 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 * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
@ -24,7 +24,8 @@
#ifndef _FOCUS_H_ #ifndef _FOCUS_H_
#define _FOCUS_H_ #define _FOCUS_H_
#include <X11/Xlib.h> #include "etypes.h"
#include "xtypes.h"
/* focus.c */ /* focus.c */
#define FOCUS_NOP 0 #define FOCUS_NOP 0

View File

@ -1,6 +1,6 @@
/* /*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors * 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 * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
@ -26,7 +26,7 @@
#include "grabs.h" #include "grabs.h"
#include "xwin.h" #include "xwin.h"
#if USE_XI2 #if USE_XI2
#include "X11/extensions/XInput2.h" #include <X11/extensions/XInput2.h>
#define DEV_PTR Mode.events.xi2_ptr #define DEV_PTR Mode.events.xi2_ptr
#define DEV_KBD Mode.events.xi2_kbd #define DEV_KBD Mode.events.xi2_kbd
#endif #endif

View File

@ -24,7 +24,6 @@
#ifndef _HINTS_H_ #ifndef _HINTS_H_
#define _HINTS_H_ #define _HINTS_H_
#include <X11/Xlib.h>
#include "etypes.h" #include "etypes.h"
#include "xprop.h" #include "xprop.h"
#include "xwin.h" #include "xwin.h"

View File

@ -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 * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
@ -23,7 +23,8 @@
#ifndef _HIWIN_H_ #ifndef _HIWIN_H_
#define _HIWIN_H_ #define _HIWIN_H_
#include <X11/Xlib.h> #include "etypes.h"
#include "xtypes.h"
typedef struct _hiwin Hiwin; typedef struct _hiwin Hiwin;

View File

@ -38,7 +38,7 @@
#include "eglx.h" #include "eglx.h"
#endif #endif
#if USE_XI2 #if USE_XI2
#include "X11/extensions/XInput2.h" #include <X11/extensions/XInput2.h>
#endif #endif
#define DEBUG_XWIN 0 #define DEBUG_XWIN 0

View File

@ -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); char *ex_window_prop_string_get(EX_Window win, EX_Atom atom);
/* Misc. */ /* Misc. */
#include "X11/Xatom.h" #include <X11/Xatom.h>
extern EX_Atom atoms_icccm[]; extern EX_Atom atoms_icccm[];
#define EX_ATOM_UTF8_STRING atoms_icccm[8] #define EX_ATOM_UTF8_STRING atoms_icccm[8]

View File

@ -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 * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
@ -23,6 +23,8 @@
#ifndef _XTYPES_H_ #ifndef _XTYPES_H_
#define _XTYPES_H_ #define _XTYPES_H_
#include <X11/Xlib.h>
typedef struct _xwin *Win; typedef struct _xwin *Win;
#endif /* _XTYPES_H_ */ #endif /* _XTYPES_H_ */

View File

@ -24,7 +24,6 @@
#ifndef _XWIN_H_ #ifndef _XWIN_H_
#define _XWIN_H_ #define _XWIN_H_
#include <X11/Xlib.h>
#include "util.h" #include "util.h"
#include "xtypes.h" #include "xtypes.h"
@ -343,7 +342,7 @@ Pixmap EWindowGetPixmap(const Win win);
#endif /* USE_COMPOSITE */ #endif /* USE_COMPOSITE */
#if USE_XI2 #if USE_XI2
#include "X11/extensions/XInput2.h" #include <X11/extensions/XInput2.h>
typedef struct { typedef struct {
XIEventMask em; XIEventMask em;