diff --git a/src/lib/clapper-gtk/clapper-gtk-billboard.h b/src/lib/clapper-gtk/clapper-gtk-billboard.h index b9f6f067..f58b03a9 100644 --- a/src/lib/clapper-gtk/clapper-gtk-billboard.h +++ b/src/lib/clapper-gtk/clapper-gtk-billboard.h @@ -27,6 +27,7 @@ #include #include +#include #include G_BEGIN_DECLS @@ -34,18 +35,25 @@ G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_BILLBOARD (clapper_gtk_billboard_get_type()) #define CLAPPER_GTK_BILLBOARD_CAST(obj) ((ClapperGtkBillboard *)(obj)) +CLAPPER_GTK_API G_DECLARE_FINAL_TYPE (ClapperGtkBillboard, clapper_gtk_billboard, CLAPPER_GTK, BILLBOARD, ClapperGtkContainer) +CLAPPER_GTK_API GtkWidget * clapper_gtk_billboard_new (void); +CLAPPER_GTK_API void clapper_gtk_billboard_post_message (ClapperGtkBillboard *billboard, const gchar *icon_name, const gchar *message); +CLAPPER_GTK_API void clapper_gtk_billboard_pin_message (ClapperGtkBillboard *billboard, const gchar *icon_name, const gchar *message); +CLAPPER_GTK_API void clapper_gtk_billboard_unpin_pinned_message (ClapperGtkBillboard *billboard); +CLAPPER_GTK_API void clapper_gtk_billboard_announce_volume (ClapperGtkBillboard *billboard); +CLAPPER_GTK_API void clapper_gtk_billboard_announce_speed (ClapperGtkBillboard *billboard); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-container.h b/src/lib/clapper-gtk/clapper-gtk-container.h index dbc54002..703d4bba 100644 --- a/src/lib/clapper-gtk/clapper-gtk-container.h +++ b/src/lib/clapper-gtk/clapper-gtk-container.h @@ -27,11 +27,14 @@ #include #include +#include + G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_CONTAINER (clapper_gtk_container_get_type()) #define CLAPPER_GTK_CONTAINER_CAST(obj) ((ClapperGtkContainer *)(obj)) +CLAPPER_GTK_API G_DECLARE_DERIVABLE_TYPE (ClapperGtkContainer, clapper_gtk_container, CLAPPER_GTK, CONTAINER, GtkWidget) struct _ClapperGtkContainerClass @@ -42,26 +45,37 @@ struct _ClapperGtkContainerClass gpointer padding[4]; }; +CLAPPER_GTK_API GtkWidget * clapper_gtk_container_new (void); +CLAPPER_GTK_API void clapper_gtk_container_set_child (ClapperGtkContainer *container, GtkWidget *child); +CLAPPER_GTK_API GtkWidget * clapper_gtk_container_get_child (ClapperGtkContainer *container); +CLAPPER_GTK_API void clapper_gtk_container_set_width_target (ClapperGtkContainer *container, gint width); +CLAPPER_GTK_API gint clapper_gtk_container_get_width_target (ClapperGtkContainer *container); +CLAPPER_GTK_API void clapper_gtk_container_set_height_target (ClapperGtkContainer *container, gint height); +CLAPPER_GTK_API gint clapper_gtk_container_get_height_target (ClapperGtkContainer *container); +CLAPPER_GTK_API void clapper_gtk_container_set_adaptive_width (ClapperGtkContainer *container, gint width); +CLAPPER_GTK_API gint clapper_gtk_container_get_adaptive_width (ClapperGtkContainer *container); +CLAPPER_GTK_API void clapper_gtk_container_set_adaptive_height (ClapperGtkContainer *container, gint height); +CLAPPER_GTK_API gint clapper_gtk_container_get_adaptive_height (ClapperGtkContainer *container); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-extra-menu-button.h b/src/lib/clapper-gtk/clapper-gtk-extra-menu-button.h index 19a5310a..e141ede1 100644 --- a/src/lib/clapper-gtk/clapper-gtk-extra-menu-button.h +++ b/src/lib/clapper-gtk/clapper-gtk-extra-menu-button.h @@ -27,25 +27,35 @@ #include #include +#include + G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_EXTRA_MENU_BUTTON (clapper_gtk_extra_menu_button_get_type()) #define CLAPPER_GTK_EXTRA_MENU_BUTTON_CAST(obj) ((ClapperGtkExtraMenuButton *)(obj)) +CLAPPER_GTK_API G_DECLARE_FINAL_TYPE (ClapperGtkExtraMenuButton, clapper_gtk_extra_menu_button, CLAPPER_GTK, EXTRA_MENU_BUTTON, GtkWidget) +CLAPPER_GTK_API GtkWidget * clapper_gtk_extra_menu_button_new (void); +CLAPPER_GTK_API void clapper_gtk_extra_menu_button_set_volume_visible (ClapperGtkExtraMenuButton *button, gboolean visible); +CLAPPER_GTK_API gboolean clapper_gtk_extra_menu_button_get_volume_visible (ClapperGtkExtraMenuButton *button); +CLAPPER_GTK_API void clapper_gtk_extra_menu_button_set_speed_visible (ClapperGtkExtraMenuButton *button, gboolean visible); +CLAPPER_GTK_API gboolean clapper_gtk_extra_menu_button_get_speed_visible (ClapperGtkExtraMenuButton *button); +CLAPPER_GTK_API void clapper_gtk_extra_menu_button_set_can_open_subtitles (ClapperGtkExtraMenuButton *button, gboolean allowed); +CLAPPER_GTK_API gboolean clapper_gtk_extra_menu_button_get_can_open_subtitles (ClapperGtkExtraMenuButton *button); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-lead-container.h b/src/lib/clapper-gtk/clapper-gtk-lead-container.h index 8d5be7ce..ec377637 100644 --- a/src/lib/clapper-gtk/clapper-gtk-lead-container.h +++ b/src/lib/clapper-gtk/clapper-gtk-lead-container.h @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -35,6 +36,7 @@ G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_LEAD_CONTAINER (clapper_gtk_lead_container_get_type()) #define CLAPPER_GTK_LEAD_CONTAINER_CAST(obj) ((ClapperGtkLeadContainer *)(obj)) +CLAPPER_GTK_API G_DECLARE_DERIVABLE_TYPE (ClapperGtkLeadContainer, clapper_gtk_lead_container, CLAPPER_GTK, LEAD_CONTAINER, ClapperGtkContainer) struct _ClapperGtkLeadContainerClass @@ -45,14 +47,19 @@ struct _ClapperGtkLeadContainerClass gpointer padding[4]; }; +CLAPPER_GTK_API GtkWidget * clapper_gtk_lead_container_new (void); +CLAPPER_GTK_API void clapper_gtk_lead_container_set_leading (ClapperGtkLeadContainer *lead_container, gboolean leading); +CLAPPER_GTK_API gboolean clapper_gtk_lead_container_get_leading (ClapperGtkLeadContainer *lead_container); +CLAPPER_GTK_API void clapper_gtk_lead_container_set_blocked_actions (ClapperGtkLeadContainer *lead_container, ClapperGtkVideoActionMask actions); +CLAPPER_GTK_API ClapperGtkVideoActionMask clapper_gtk_lead_container_get_blocked_actions (ClapperGtkLeadContainer *lead_container); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-next-item-button.h b/src/lib/clapper-gtk/clapper-gtk-next-item-button.h index a792c5ed..7e41572d 100644 --- a/src/lib/clapper-gtk/clapper-gtk-next-item-button.h +++ b/src/lib/clapper-gtk/clapper-gtk-next-item-button.h @@ -27,13 +27,17 @@ #include #include +#include + G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_NEXT_ITEM_BUTTON (clapper_gtk_next_item_button_get_type()) #define CLAPPER_GTK_NEXT_ITEM_BUTTON_CAST(obj) ((ClapperGtkNextItemButton *)(obj)) +CLAPPER_GTK_API G_DECLARE_FINAL_TYPE (ClapperGtkNextItemButton, clapper_gtk_next_item_button, CLAPPER_GTK, NEXT_ITEM_BUTTON, GtkButton) +CLAPPER_GTK_API GtkWidget * clapper_gtk_next_item_button_new (void); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-previous-item-button.h b/src/lib/clapper-gtk/clapper-gtk-previous-item-button.h index e6a4838b..248dced0 100644 --- a/src/lib/clapper-gtk/clapper-gtk-previous-item-button.h +++ b/src/lib/clapper-gtk/clapper-gtk-previous-item-button.h @@ -27,13 +27,17 @@ #include #include +#include + G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_PREVIOUS_ITEM_BUTTON (clapper_gtk_previous_item_button_get_type()) #define CLAPPER_GTK_PREVIOUS_ITEM_BUTTON_CAST(obj) ((ClapperGtkPreviousItemButton *)(obj)) +CLAPPER_GTK_API G_DECLARE_FINAL_TYPE (ClapperGtkPreviousItemButton, clapper_gtk_previous_item_button, CLAPPER_GTK, PREVIOUS_ITEM_BUTTON, GtkButton) +CLAPPER_GTK_API GtkWidget * clapper_gtk_previous_item_button_new (void); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-seek-bar.h b/src/lib/clapper-gtk/clapper-gtk-seek-bar.h index b2f93215..ebe6b2d8 100644 --- a/src/lib/clapper-gtk/clapper-gtk-seek-bar.h +++ b/src/lib/clapper-gtk/clapper-gtk-seek-bar.h @@ -28,21 +28,29 @@ #include #include +#include + G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_SEEK_BAR (clapper_gtk_seek_bar_get_type()) #define CLAPPER_GTK_SEEK_BAR_CAST(obj) ((ClapperGtkSeekBar *)(obj)) +CLAPPER_GTK_API G_DECLARE_FINAL_TYPE (ClapperGtkSeekBar, clapper_gtk_seek_bar, CLAPPER_GTK, SEEK_BAR, GtkWidget) +CLAPPER_GTK_API GtkWidget * clapper_gtk_seek_bar_new (void); +CLAPPER_GTK_API void clapper_gtk_seek_bar_set_reveal_labels (ClapperGtkSeekBar *seek_bar, gboolean reveal); +CLAPPER_GTK_API gboolean clapper_gtk_seek_bar_get_reveal_labels (ClapperGtkSeekBar *seek_bar); +CLAPPER_GTK_API void clapper_gtk_seek_bar_set_seek_method (ClapperGtkSeekBar *seek_bar, ClapperPlayerSeekMethod method); +CLAPPER_GTK_API ClapperPlayerSeekMethod clapper_gtk_seek_bar_get_seek_method (ClapperGtkSeekBar *seek_bar); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-simple-controls.h b/src/lib/clapper-gtk/clapper-gtk-simple-controls.h index cd1fcd4a..871e1171 100644 --- a/src/lib/clapper-gtk/clapper-gtk-simple-controls.h +++ b/src/lib/clapper-gtk/clapper-gtk-simple-controls.h @@ -26,6 +26,8 @@ #include #include #include + +#include #include #include @@ -34,18 +36,25 @@ G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_SIMPLE_CONTROLS (clapper_gtk_simple_controls_get_type()) #define CLAPPER_GTK_SIMPLE_CONTROLS_CAST(obj) ((ClapperGtkSimpleControls *)(obj)) +CLAPPER_GTK_API G_DECLARE_FINAL_TYPE (ClapperGtkSimpleControls, clapper_gtk_simple_controls, CLAPPER_GTK, SIMPLE_CONTROLS, ClapperGtkContainer) +CLAPPER_GTK_API GtkWidget * clapper_gtk_simple_controls_new (void); +CLAPPER_GTK_API void clapper_gtk_simple_controls_set_fullscreenable (ClapperGtkSimpleControls *controls, gboolean fullscreenable); +CLAPPER_GTK_API gboolean clapper_gtk_simple_controls_get_fullscreenable (ClapperGtkSimpleControls *controls); +CLAPPER_GTK_API void clapper_gtk_simple_controls_set_seek_method (ClapperGtkSimpleControls *controls, ClapperPlayerSeekMethod method); +CLAPPER_GTK_API ClapperPlayerSeekMethod clapper_gtk_simple_controls_get_seek_method (ClapperGtkSimpleControls *controls); +CLAPPER_GTK_API ClapperGtkExtraMenuButton * clapper_gtk_simple_controls_get_extra_menu_button (ClapperGtkSimpleControls *controls); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-title-header.h b/src/lib/clapper-gtk/clapper-gtk-title-header.h index 2f918867..3c582f0a 100644 --- a/src/lib/clapper-gtk/clapper-gtk-title-header.h +++ b/src/lib/clapper-gtk/clapper-gtk-title-header.h @@ -26,6 +26,8 @@ #include #include #include + +#include #include G_BEGIN_DECLS @@ -33,14 +35,19 @@ G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_TITLE_HEADER (clapper_gtk_title_header_get_type()) #define CLAPPER_GTK_TITLE_HEADER_CAST(obj) ((ClapperGtkTitleHeader *)(obj)) +CLAPPER_GTK_API G_DECLARE_FINAL_TYPE (ClapperGtkTitleHeader, clapper_gtk_title_header, CLAPPER_GTK, TITLE_HEADER, ClapperGtkLeadContainer) +CLAPPER_GTK_API GtkWidget * clapper_gtk_title_header_new (void); +CLAPPER_GTK_API const gchar * clapper_gtk_title_header_get_current_title (ClapperGtkTitleHeader *header); +CLAPPER_GTK_API void clapper_gtk_title_header_set_fallback_to_uri (ClapperGtkTitleHeader *header, gboolean enabled); +CLAPPER_GTK_API gboolean clapper_gtk_title_header_get_fallback_to_uri (ClapperGtkTitleHeader *header); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-title-label.h b/src/lib/clapper-gtk/clapper-gtk-title-label.h index d5593a77..ffd50042 100644 --- a/src/lib/clapper-gtk/clapper-gtk-title-label.h +++ b/src/lib/clapper-gtk/clapper-gtk-title-label.h @@ -28,23 +28,32 @@ #include #include +#include + G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_TITLE_LABEL (clapper_gtk_title_label_get_type()) #define CLAPPER_GTK_TITLE_LABEL_CAST(obj) ((ClapperGtkTitleLabel *)(obj)) +CLAPPER_GTK_API G_DECLARE_FINAL_TYPE (ClapperGtkTitleLabel, clapper_gtk_title_label, CLAPPER_GTK, TITLE_LABEL, GtkWidget) +CLAPPER_GTK_API GtkWidget * clapper_gtk_title_label_new (void); +CLAPPER_GTK_API void clapper_gtk_title_label_set_media_item (ClapperGtkTitleLabel *label, ClapperMediaItem *item); +CLAPPER_GTK_API ClapperMediaItem * clapper_gtk_title_label_get_media_item (ClapperGtkTitleLabel *label); +CLAPPER_GTK_API const gchar * clapper_gtk_title_label_get_current_title (ClapperGtkTitleLabel *label); +CLAPPER_GTK_API void clapper_gtk_title_label_set_fallback_to_uri (ClapperGtkTitleLabel *label, gboolean enabled); +CLAPPER_GTK_API gboolean clapper_gtk_title_label_get_fallback_to_uri (ClapperGtkTitleLabel *label); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-toggle-fullscreen-button.h b/src/lib/clapper-gtk/clapper-gtk-toggle-fullscreen-button.h index d3f51083..d4e3acb1 100644 --- a/src/lib/clapper-gtk/clapper-gtk-toggle-fullscreen-button.h +++ b/src/lib/clapper-gtk/clapper-gtk-toggle-fullscreen-button.h @@ -27,13 +27,17 @@ #include #include +#include + G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_TOGGLE_FULLSCREEN_BUTTON (clapper_gtk_toggle_fullscreen_button_get_type()) #define CLAPPER_GTK_TOGGLE_FULLSCREEN_BUTTON_CAST(obj) ((ClapperGtkToggleFullscreenButton *)(obj)) +CLAPPER_GTK_API G_DECLARE_FINAL_TYPE (ClapperGtkToggleFullscreenButton, clapper_gtk_toggle_fullscreen_button, CLAPPER_GTK, TOGGLE_FULLSCREEN_BUTTON, GtkButton) +CLAPPER_GTK_API GtkWidget * clapper_gtk_toggle_fullscreen_button_new (void); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-toggle-play-button.h b/src/lib/clapper-gtk/clapper-gtk-toggle-play-button.h index 1eec02e0..3499deef 100644 --- a/src/lib/clapper-gtk/clapper-gtk-toggle-play-button.h +++ b/src/lib/clapper-gtk/clapper-gtk-toggle-play-button.h @@ -27,13 +27,17 @@ #include #include +#include + G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_TOGGLE_PLAY_BUTTON (clapper_gtk_toggle_play_button_get_type()) #define CLAPPER_GTK_TOGGLE_PLAY_BUTTON_CAST(obj) ((ClapperGtkTogglePlayButton *)(obj)) +CLAPPER_GTK_API G_DECLARE_FINAL_TYPE (ClapperGtkTogglePlayButton, clapper_gtk_toggle_play_button, CLAPPER_GTK, TOGGLE_PLAY_BUTTON, GtkButton) +CLAPPER_GTK_API GtkWidget * clapper_gtk_toggle_play_button_new (void); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-utils.h b/src/lib/clapper-gtk/clapper-gtk-utils.h index be5d54de..6c26345c 100644 --- a/src/lib/clapper-gtk/clapper-gtk-utils.h +++ b/src/lib/clapper-gtk/clapper-gtk-utils.h @@ -27,8 +27,11 @@ #include #include +#include + G_BEGIN_DECLS +CLAPPER_GTK_API ClapperPlayer * clapper_gtk_get_player_from_ancestor (GtkWidget *widget); G_END_DECLS diff --git a/src/lib/clapper-gtk/clapper-gtk-video.h b/src/lib/clapper-gtk/clapper-gtk-video.h index d86a6f5c..bcda7296 100644 --- a/src/lib/clapper-gtk/clapper-gtk-video.h +++ b/src/lib/clapper-gtk/clapper-gtk-video.h @@ -28,33 +28,47 @@ #include #include +#include + G_BEGIN_DECLS #define CLAPPER_GTK_TYPE_VIDEO (clapper_gtk_video_get_type()) #define CLAPPER_GTK_VIDEO_CAST(obj) ((ClapperGtkVideo *)(obj)) +CLAPPER_GTK_API G_DECLARE_FINAL_TYPE (ClapperGtkVideo, clapper_gtk_video, CLAPPER_GTK, VIDEO, GtkWidget) +CLAPPER_GTK_API GtkWidget * clapper_gtk_video_new (void); +CLAPPER_GTK_API void clapper_gtk_video_add_overlay (ClapperGtkVideo *video, GtkWidget *widget); +CLAPPER_GTK_API void clapper_gtk_video_add_fading_overlay (ClapperGtkVideo *video, GtkWidget *widget); +CLAPPER_GTK_API ClapperPlayer * clapper_gtk_video_get_player (ClapperGtkVideo *video); +CLAPPER_GTK_API void clapper_gtk_video_set_fade_delay (ClapperGtkVideo *video, guint delay); +CLAPPER_GTK_API guint clapper_gtk_video_get_fade_delay (ClapperGtkVideo *video); +CLAPPER_GTK_API void clapper_gtk_video_set_touch_fade_delay (ClapperGtkVideo *video, guint delay); +CLAPPER_GTK_API guint clapper_gtk_video_get_touch_fade_delay (ClapperGtkVideo *video); +CLAPPER_GTK_API void clapper_gtk_video_set_auto_inhibit (ClapperGtkVideo *video, gboolean inhibit); +CLAPPER_GTK_API gboolean clapper_gtk_video_get_auto_inhibit (ClapperGtkVideo *video); +CLAPPER_GTK_API gboolean clapper_gtk_video_get_inhibited (ClapperGtkVideo *video); G_END_DECLS diff --git a/src/lib/clapper-gtk/meson.build b/src/lib/clapper-gtk/meson.build index 0a9db374..84d8b17a 100644 --- a/src/lib/clapper-gtk/meson.build +++ b/src/lib/clapper-gtk/meson.build @@ -39,6 +39,19 @@ configure_file( configuration: config_h, ) +visibility_conf = configuration_data() + +visibility_conf.set( + 'CLAPPER_API', + 'CLAPPER_GTK', +) + +clappergtk_visibility_header = configure_file( + input: '../shared/clapper-api-visibility.h.in', + output: 'clapper-gtk-visibility.h', + configuration: visibility_conf, +) + version_conf = configuration_data() version_conf.set( @@ -93,6 +106,7 @@ clappergtk_headers = [ 'clapper-gtk-utils.h', 'clapper-gtk-video.h', clappergtk_version_header, + clappergtk_visibility_header, ] clappergtk_sources = [ 'clapper-gtk-billboard.c', @@ -122,11 +136,17 @@ clappergtk_c_args = [ '-DGST_USE_UNSTABLE_API', ] +if get_option('default_library') == 'static' + clappergtk_c_args += ['-DCLAPPER_GTK_STATIC_COMPILATION'] +endif + clappergtk_headers_dir = join_paths(includedir, clapper_api_name, 'clapper-gtk') clappergtk_enums = gnome.mkenums_simple( 'clapper-gtk-enum-types', sources: clappergtk_headers, + decorator: 'CLAPPER_GTK_API', + header_prefix: '#include ', identifier_prefix: 'ClapperGtk', symbol_prefix: 'clapper_gtk', install_header: true, @@ -215,6 +235,7 @@ clappergtk_dep = declare_dependency( include_directories: clappergtk_conf_inc, dependencies: clappergtk_deps, sources: [ + clappergtk_visibility_header, clappergtk_version_header, clappergtk_enums[1], ],