Even more includes
Expand the modulemap to cover some of the system headers too. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
4bdbd48e55
commit
f649a949e2
|
@ -1,3 +1,5 @@
|
|||
#include <xcb/xcb.h>
|
||||
|
||||
#include "backend.h"
|
||||
#include "config.h"
|
||||
#include "win.h"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include <string.h>
|
||||
#include <xcb/xcb_image.h>
|
||||
#include <xcb/render.h>
|
||||
#include <xcb/xcb_renderutil.h>
|
||||
|
||||
#include "backend.h"
|
||||
#include "backend_common.h"
|
||||
|
|
|
@ -2,14 +2,17 @@
|
|||
#include <GL/glext.h>
|
||||
#include <locale.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <xcb/render.h> // for xcb_render_fixed_t, XXX
|
||||
|
||||
#include "common.h"
|
||||
#include "compiler.h"
|
||||
#include "config.h"
|
||||
#include "log.h"
|
||||
#include "region.h"
|
||||
#include "string_utils.h"
|
||||
#include "utils.h"
|
||||
#include "compiler.h"
|
||||
#include "config.h"
|
||||
|
||||
#include "backend/gl/gl_common.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
#include <string.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
|
|
|
@ -9,9 +9,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <GL/glx.h>
|
||||
#include <stdbool.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/composite.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <pixman.h>
|
||||
|
||||
#include "backend/backend.h"
|
||||
#include "backend/gl/gl_common.h"
|
||||
|
@ -19,7 +24,6 @@
|
|||
#include "compiler.h"
|
||||
#include "log.h"
|
||||
#include "region.h"
|
||||
#include "string_utils.h"
|
||||
#include "utils.h"
|
||||
#include "win.h"
|
||||
#include "config.h"
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/present.h>
|
||||
#include <xcb/sync.h>
|
||||
#include <xcb/render.h>
|
||||
#include <xcb/composite.h>
|
||||
|
||||
#include "backend/backend.h"
|
||||
#include "backend_common.h"
|
||||
|
|
2
src/c2.c
2
src/c2.c
|
@ -10,6 +10,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <fnmatch.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
|
|
@ -9,9 +9,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xlib-xcb.h>
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/extensions/sync.h>
|
||||
|
@ -19,7 +21,10 @@
|
|||
#include <xcb/present.h>
|
||||
#include <xcb/damage.h>
|
||||
#include <xcb/render.h>
|
||||
#include <xcb/xcb_image.h>
|
||||
#include <xcb/xfixes.h>
|
||||
#include <xcb/sync.h>
|
||||
#include <xcb/composite.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
#include <ev.h>
|
||||
|
||||
|
@ -33,14 +38,11 @@
|
|||
#include "x.h"
|
||||
#include "config.h"
|
||||
#include "diagnostic.h"
|
||||
#include "string_utils.h"
|
||||
#include "render.h"
|
||||
#include "utils.h"
|
||||
#include "region.h"
|
||||
#include "types.h"
|
||||
#include "c2.h"
|
||||
#include "kernel.h"
|
||||
#include "vsync.h"
|
||||
#include "log.h"
|
||||
#ifdef CONFIG_DBUS
|
||||
#include "dbus.h"
|
||||
|
|
|
@ -2,33 +2,16 @@
|
|||
// Copyright (c)
|
||||
|
||||
// Throw everything in here.
|
||||
|
||||
// !!! DON'T !!!
|
||||
|
||||
// === Includes ===
|
||||
|
||||
#include <math.h>
|
||||
#include <sys/select.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <locale.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef CONFIG_VSYNC_DRM
|
||||
#include <fcntl.h>
|
||||
// We references some definitions in drm.h, which could also be found in
|
||||
// /usr/src/linux/include/drm/drm.h, but that path is probably even less
|
||||
// reliable than libdrm
|
||||
#include <drm.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <xcb/xproto.h>
|
||||
|
||||
#include <X11/Xutil.h>
|
||||
#include <pixman.h>
|
||||
#ifdef CONFIG_OPENGL
|
||||
#include "opengl.h" // XXX clean up
|
||||
#endif
|
||||
#include "common.h"
|
||||
#include "win.h"
|
||||
#include "x.h"
|
||||
|
@ -39,6 +22,7 @@
|
|||
#include "types.h"
|
||||
#include "utils.h"
|
||||
#include "render.h"
|
||||
#include "config.h"
|
||||
|
||||
// == Functions ==
|
||||
// TODO move static inline functions that are only used in compton.c, into
|
||||
|
|
|
@ -14,14 +14,15 @@ module kernel {
|
|||
header "kernel.h"
|
||||
}
|
||||
module utils {
|
||||
// Has macros expands to calloc/malloc
|
||||
header "utils.h"
|
||||
export libc.stdlib
|
||||
}
|
||||
module region {
|
||||
header "region.h"
|
||||
}
|
||||
module compton {
|
||||
header "compton.h"
|
||||
exclude header "/usr/include/X11/Xlib.h"
|
||||
}
|
||||
module types {
|
||||
header "types.h"
|
||||
|
@ -43,7 +44,6 @@ module diagnostic {
|
|||
}
|
||||
module win {
|
||||
header "win.h"
|
||||
exclude header "/usr/include/GL/glx.h"
|
||||
}
|
||||
module log {
|
||||
header "log.h"
|
||||
|
@ -56,8 +56,6 @@ module vsync {
|
|||
}
|
||||
module common {
|
||||
header "common.h"
|
||||
exclude header "/usr/include/X11/Xlib.h"
|
||||
exclude header "/usr/include/GL/glx.h"
|
||||
}
|
||||
module config {
|
||||
header "config.h"
|
||||
|
@ -78,7 +76,128 @@ module backend {
|
|||
header "backend/backend_common.h"
|
||||
}
|
||||
}
|
||||
module Xlib {
|
||||
header "/usr/include/X11/Xlib.h"
|
||||
export *
|
||||
module xcb [system] {
|
||||
module xcb {
|
||||
header "/usr/include/xcb/xcb.h"
|
||||
export *
|
||||
}
|
||||
module randr {
|
||||
header "/usr/include/xcb/randr.h"
|
||||
export *
|
||||
}
|
||||
module render {
|
||||
header "/usr/include/xcb/render.h"
|
||||
export *
|
||||
}
|
||||
module sync {
|
||||
header "/usr/include/xcb/sync.h"
|
||||
export *
|
||||
}
|
||||
module composite {
|
||||
header "/usr/include/xcb/composite.h"
|
||||
export *
|
||||
}
|
||||
module xfixes {
|
||||
header "/usr/include/xcb/xfixes.h"
|
||||
export *
|
||||
}
|
||||
module damage {
|
||||
header "/usr/include/xcb/damage.h"
|
||||
export *
|
||||
}
|
||||
module xproto {
|
||||
header "/usr/include/xcb/xproto.h"
|
||||
export *
|
||||
}
|
||||
module present {
|
||||
header "/usr/include/xcb/present.h"
|
||||
}
|
||||
module util {
|
||||
module render {
|
||||
header "/usr/include/xcb/xcb_renderutil.h"
|
||||
export *
|
||||
}
|
||||
}
|
||||
}
|
||||
module X11 [system] {
|
||||
module Xlib {
|
||||
header "/usr/include/X11/Xlib.h"
|
||||
export *
|
||||
}
|
||||
module Xutil {
|
||||
header "/usr/include/X11/Xutil.h"
|
||||
export *
|
||||
}
|
||||
}
|
||||
module GL [system] {
|
||||
module glx {
|
||||
header "/usr/include/GL/glx.h"
|
||||
export *
|
||||
}
|
||||
module gl {
|
||||
header "/usr/include/GL/gl.h"
|
||||
export *
|
||||
}
|
||||
}
|
||||
module libc [system] {
|
||||
export *
|
||||
module assert {
|
||||
export *
|
||||
textual header "/usr/include/assert.h"
|
||||
}
|
||||
module string {
|
||||
export *
|
||||
header "/usr/include/string.h"
|
||||
}
|
||||
module ctype {
|
||||
export *
|
||||
header "/usr/include/ctype.h"
|
||||
}
|
||||
module errno {
|
||||
export *
|
||||
header "/usr/include/errno.h"
|
||||
}
|
||||
module fenv {
|
||||
export *
|
||||
header "/usr/include/fenv.h"
|
||||
}
|
||||
module inttypes {
|
||||
export *
|
||||
header "/usr/include/inttypes.h"
|
||||
}
|
||||
module math {
|
||||
export *
|
||||
header "/usr/include/math.h"
|
||||
}
|
||||
module setjmp {
|
||||
export *
|
||||
header "/usr/include/setjmp.h"
|
||||
}
|
||||
module stdio {
|
||||
export *
|
||||
header "/usr/include/stdio.h"
|
||||
}
|
||||
|
||||
module stdlib [system] {
|
||||
export *
|
||||
header "/usr/include/stdlib.h"
|
||||
}
|
||||
}
|
||||
|
||||
// glib specific header. In it's own module because it
|
||||
// doesn't exist on some systems with unpatched glib 2.26+
|
||||
module "xlocale.h" [system] {
|
||||
export *
|
||||
header "/usr/include/xlocale.h"
|
||||
}
|
||||
|
||||
// System header that we have difficult with merging.
|
||||
module "sys_types.h" [system] {
|
||||
export *
|
||||
header "/usr/include/sys/types.h"
|
||||
}
|
||||
|
||||
module "signal.h" [system] {
|
||||
export *
|
||||
header "/usr/include/signal.h"
|
||||
}
|
||||
|
|
|
@ -2,8 +2,12 @@
|
|||
// Copyright (c) 2011-2013, Christopher Jeffrey
|
||||
// Copyright (c) 2013 Richard Grenville <pyxlcy@gmail.com>
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <xcb/render.h> // for xcb_render_fixed_t, XXX
|
||||
|
||||
#include "compiler.h"
|
||||
#include "common.h"
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include <stdbool.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/render.h> // for xcb_render_fixed_t, XXX
|
||||
#include <xcb/xfixes.h>
|
||||
|
||||
#ifdef CONFIG_LIBCONFIG
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libgen.h>
|
||||
#include <libconfig.h>
|
||||
|
|
|
@ -9,11 +9,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "config.h"
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright (c) 2018 Yuxuan Shui <yshuiv7@gmail.com>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <xcb/xcb.h>
|
||||
|
||||
#include "diagnostic.h"
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/uio.h>
|
||||
#include <time.h>
|
||||
|
|
|
@ -9,7 +9,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/glx.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/render.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "string_utils.h"
|
||||
|
|
|
@ -18,8 +18,12 @@
|
|||
#include "win.h"
|
||||
#include "log.h"
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <locale.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
/// @brief Wrapper of a GLX FBConfig.
|
||||
typedef struct glx_fbconfig {
|
||||
|
|
|
@ -4,14 +4,18 @@
|
|||
#include <getopt.h>
|
||||
#include <locale.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <xcb/render.h> // for xcb_render_fixed_t, XXX
|
||||
|
||||
#include "common.h"
|
||||
#include "config.h"
|
||||
#include "log.h"
|
||||
#include "options.h"
|
||||
#include "utils.h"
|
||||
#include "win.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
|
||||
#pragma GCC diagnostic error "-Wunused-parameter"
|
||||
|
||||
|
@ -466,8 +470,7 @@ static const struct option longopts[] = {
|
|||
|
||||
/// Get config options that are needed to parse the rest of the options
|
||||
/// Return true if we should quit
|
||||
bool get_early_config(int argc, char *const *argv, char **config_file, bool *all_xerrors,
|
||||
int *exit_code) {
|
||||
bool get_early_config(int argc, char *const *argv, char **config_file, bool *all_xerrors, int *exit_code) {
|
||||
int o = 0, longopt_idx = -1;
|
||||
|
||||
// Pre-parse the commandline arguments to check for --config and invalid
|
||||
|
@ -839,8 +842,7 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
|
|||
DOUBLE_TO_XFIXED(1),
|
||||
DOUBLE_TO_XFIXED(1),
|
||||
};
|
||||
opt->blur_kerns[0] =
|
||||
ccalloc(ARR_SIZE(convolution_blur), xcb_render_fixed_t);
|
||||
opt->blur_kerns[0] = ccalloc(ARR_SIZE(convolution_blur), xcb_render_fixed_t);
|
||||
memcpy(opt->blur_kerns[0], convolution_blur, sizeof(convolution_blur));
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Copyright (c) 2018 Yuxuan Shui <yshuiv7@gmail.com>
|
||||
#pragma once
|
||||
#include <xcb/xcb.h>
|
||||
#include <stdlib.h>
|
||||
#include <pixman.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright (c) Yuxuan Shui <yshuiv7@gmail.com>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <xcb/xcb_image.h>
|
||||
#include <xcb/composite.h>
|
||||
#include <xcb/sync.h>
|
||||
#include <xcb/render.h>
|
||||
#include <xcb/xcb_renderutil.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "options.h"
|
||||
|
||||
#ifdef CONFIG_OPENGL
|
||||
#include <GL/glx.h>
|
||||
#include "opengl.h"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Copyright (c) Yuxuan Shui <yshuiv7@gmail.com>
|
||||
#pragma once
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/render.h>
|
||||
#include <stdbool.h>
|
||||
#include "region.h"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include "compiler.h"
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
/// Function pointers to init VSync modes.
|
||||
|
||||
#include <GL/glx.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "log.h"
|
||||
|
||||
|
|
|
@ -3,11 +3,15 @@
|
|||
// Copyright (c) 2013 Richard Grenville <pyxlcy@gmail.com>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/render.h>
|
||||
#include <xcb/damage.h>
|
||||
#include <xcb/xcb_renderutil.h>
|
||||
#include <stdbool.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "common.h"
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
// Copyright (c) 2013 Richard Grenville <pyxlcy@gmail.com>
|
||||
#pragma once
|
||||
#include <stdbool.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/render.h>
|
||||
#include <xcb/damage.h>
|
||||
|
||||
// FIXME shouldn't need this
|
||||
#ifdef CONFIG_OPENGL
|
||||
#include <GL/glx.h>
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#include "x.h"
|
||||
|
|
6
src/x.c
6
src/x.c
|
@ -1,12 +1,18 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright (c) 2018 Yuxuan Shui <yshuiv7@gmail.com>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <X11/Xutil.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_renderutil.h>
|
||||
#include <xcb/xfixes.h>
|
||||
#include <xcb/sync.h>
|
||||
#include <xcb/composite.h>
|
||||
#include <xcb/damage.h>
|
||||
#include <xcb/render.h>
|
||||
#include <pixman.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
#include "utils.h"
|
||||
#include "region.h"
|
||||
|
|
Loading…
Reference in New Issue