clapper-app: Fix internal functions visibility

We have to export functions that are used from UI files, otherwise they are
not accessible. For this reason add a special internal visibility header.
This commit is contained in:
Rafał Dzięgiel
2025-01-18 15:11:43 +01:00
parent f017b23798
commit e35d04a742
2 changed files with 22 additions and 0 deletions

View File

@@ -21,18 +21,26 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <clapper/clapper.h> #include <clapper/clapper.h>
#include "clapper-app-internal-visibility.h"
G_BEGIN_DECLS G_BEGIN_DECLS
CLAPPER_APP_INTERNAL_API
gchar * clapper_app_list_item_make_stream_group_title (GtkListItem *list_item, ClapperStream *stream); gchar * clapper_app_list_item_make_stream_group_title (GtkListItem *list_item, ClapperStream *stream);
CLAPPER_APP_INTERNAL_API
gchar * clapper_app_list_item_make_resolution (GtkListItem *list_item, gint width, gint height); gchar * clapper_app_list_item_make_resolution (GtkListItem *list_item, gint width, gint height);
CLAPPER_APP_INTERNAL_API
gchar * clapper_app_list_item_make_bitrate (GtkListItem *list_item, guint value); gchar * clapper_app_list_item_make_bitrate (GtkListItem *list_item, guint value);
CLAPPER_APP_INTERNAL_API
gchar * clapper_app_list_item_convert_int (GtkListItem *list_item, gint value); gchar * clapper_app_list_item_convert_int (GtkListItem *list_item, gint value);
CLAPPER_APP_INTERNAL_API
gchar * clapper_app_list_item_convert_uint (GtkListItem *list_item, guint value); gchar * clapper_app_list_item_convert_uint (GtkListItem *list_item, guint value);
CLAPPER_APP_INTERNAL_API
gchar * clapper_app_list_item_convert_double (GtkListItem *list_item, gdouble value); gchar * clapper_app_list_item_convert_double (GtkListItem *list_item, gdouble value);
G_END_DECLS G_END_DECLS

View File

@@ -53,6 +53,19 @@ configure_file(
configuration: config_h, configuration: config_h,
) )
visibility_conf = configuration_data()
visibility_conf.set(
'CLAPPER_API',
'CLAPPER_APP_INTERNAL',
)
configure_file(
input: '../../lib/shared/clapper-api-visibility.h.in',
output: 'clapper-app-internal-visibility.h',
configuration: visibility_conf,
)
clapperapp_sources = [ clapperapp_sources = [
'clapper-app-about-window.c', 'clapper-app-about-window.c',
'clapper-app-application.c', 'clapper-app-application.c',
@@ -77,6 +90,7 @@ clapperapp_sources = [
] ]
clapperapp_c_args = [ clapperapp_c_args = [
'-DG_LOG_DOMAIN="ClapperApp"', '-DG_LOG_DOMAIN="ClapperApp"',
'-DCLAPPER_APP_INTERNAL_COMPILATION',
'-DGST_USE_UNSTABLE_API', '-DGST_USE_UNSTABLE_API',
] ]