meta/common: Put META_EXPORT in its own header

Want to include it without including all of clutter and cogl.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3304>
This commit is contained in:
Jonas Ådahl 2024-04-11 15:29:05 +02:00 committed by Marge Bot
parent 0b91d22848
commit a24b7956da
3 changed files with 23 additions and 2 deletions

View File

@ -27,6 +27,7 @@
#include <glib.h> #include <glib.h>
#include "clutter/clutter.h" #include "clutter/clutter.h"
#include "meta/meta-base.h"
#include "meta/meta-enums.h" #include "meta/meta-enums.h"
/** /**
@ -42,8 +43,6 @@
/* Replacement for X11 CurrentTime */ /* Replacement for X11 CurrentTime */
#define META_CURRENT_TIME 0L #define META_CURRENT_TIME 0L
#define META_EXPORT __attribute__((visibility("default"))) extern
#define MAX_BUTTONS_PER_CORNER META_BUTTON_FUNCTION_LAST #define MAX_BUTTONS_PER_CORNER META_BUTTON_FUNCTION_LAST
/* Keep array size in sync with MAX_BUTTONS_PER_CORNER */ /* Keep array size in sync with MAX_BUTTONS_PER_CORNER */

View File

@ -9,6 +9,7 @@ mutter_public_headers = [
'keybindings.h', 'keybindings.h',
'main.h', 'main.h',
'meta-backend.h', 'meta-backend.h',
'meta-base.h',
'meta-background.h', 'meta-background.h',
'meta-background-actor.h', 'meta-background-actor.h',
'meta-background-content.h', 'meta-background-content.h',

21
src/meta/meta-base.h Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#define META_EXPORT __attribute__((visibility("default"))) extern