From a24b7956da73f7b71fa0df81085adf07d205df16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 11 Apr 2024 15:29:05 +0200 Subject: [PATCH] meta/common: Put META_EXPORT in its own header Want to include it without including all of clutter and cogl. Part-of: --- src/meta/common.h | 3 +-- src/meta/meson.build | 1 + src/meta/meta-base.h | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 src/meta/meta-base.h diff --git a/src/meta/common.h b/src/meta/common.h index ee978ac6a..ed3aa81ef 100644 --- a/src/meta/common.h +++ b/src/meta/common.h @@ -27,6 +27,7 @@ #include #include "clutter/clutter.h" +#include "meta/meta-base.h" #include "meta/meta-enums.h" /** @@ -42,8 +43,6 @@ /* Replacement for X11 CurrentTime */ #define META_CURRENT_TIME 0L -#define META_EXPORT __attribute__((visibility("default"))) extern - #define MAX_BUTTONS_PER_CORNER META_BUTTON_FUNCTION_LAST /* Keep array size in sync with MAX_BUTTONS_PER_CORNER */ diff --git a/src/meta/meson.build b/src/meta/meson.build index 655dedeaf..a12ee492d 100644 --- a/src/meta/meson.build +++ b/src/meta/meson.build @@ -9,6 +9,7 @@ mutter_public_headers = [ 'keybindings.h', 'main.h', 'meta-backend.h', + 'meta-base.h', 'meta-background.h', 'meta-background-actor.h', 'meta-background-content.h', diff --git a/src/meta/meta-base.h b/src/meta/meta-base.h new file mode 100644 index 000000000..e344b2221 --- /dev/null +++ b/src/meta/meta-base.h @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2001 Havoc Pennington + * Copyright (C) 2005 Elijah Newren + * + * 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, see . + */ + +#pragma once + +#define META_EXPORT __attribute__((visibility("default"))) extern