[amtk/meson-msvc: 8/18] Public headers: Mark public API with _AMTK_EXTERN
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [amtk/meson-msvc: 8/18] Public headers: Mark public API with _AMTK_EXTERN
- Date: Fri, 8 May 2020 07:47:45 +0000 (UTC)
commit f4e6b4dfec9211fa41106d9cc19debeafbe12063
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Apr 28 13:18:06 2020 +0800
Public headers: Mark public API with _AMTK_EXTERN
This prepares export via compiler directives when needed
amtk/amtk-action-info-central-store.h | 3 +++
amtk/amtk-action-info-store.h | 7 +++++++
amtk/amtk-action-info.h | 18 ++++++++++++++++++
amtk/amtk-action-map.h | 2 ++
amtk/amtk-application-window.h | 9 +++++++++
amtk/amtk-enum-types.h.template | 3 ++-
amtk/amtk-factory.h | 20 ++++++++++++++++++++
amtk/amtk-gmenu.h | 3 +++
amtk/amtk-init.h | 3 +++
amtk/amtk-menu-item.h | 4 ++++
amtk/amtk-menu-shell.h | 3 +++
amtk/amtk-shortcuts.h | 4 ++++
amtk/amtk-utils.h | 5 +++++
13 files changed, 83 insertions(+), 1 deletion(-)
---
diff --git a/amtk/amtk-action-info-central-store.h b/amtk/amtk-action-info-central-store.h
index 2b55ae6..60ae228 100644
--- a/amtk/amtk-action-info-central-store.h
+++ b/amtk/amtk-action-info-central-store.h
@@ -53,11 +53,14 @@ struct _AmtkActionInfoCentralStoreClass
gpointer padding[12];
};
+_AMTK_EXTERN
GType amtk_action_info_central_store_get_type (void) G_GNUC_CONST;
+_AMTK_EXTERN
AmtkActionInfoCentralStore *
amtk_action_info_central_store_get_singleton (void);
+_AMTK_EXTERN
AmtkActionInfo *amtk_action_info_central_store_lookup (AmtkActionInfoCentralStore *central_store,
const gchar *action_name);
diff --git a/amtk/amtk-action-info-store.h b/amtk/amtk-action-info-store.h
index 24d7db4..50c6704 100644
--- a/amtk/amtk-action-info-store.h
+++ b/amtk/amtk-action-info-store.h
@@ -53,24 +53,31 @@ struct _AmtkActionInfoStoreClass
gpointer padding[12];
};
+_AMTK_EXTERN
GType amtk_action_info_store_get_type (void);
+_AMTK_EXTERN
AmtkActionInfoStore * amtk_action_info_store_new (void);
+_AMTK_EXTERN
void amtk_action_info_store_add (AmtkActionInfoStore *store,
AmtkActionInfo *info);
+_AMTK_EXTERN
void amtk_action_info_store_add_entries (AmtkActionInfoStore *store,
const AmtkActionInfoEntry *entries,
gint n_entries,
const gchar
*translation_domain);
+_AMTK_EXTERN
AmtkActionInfo * amtk_action_info_store_lookup (AmtkActionInfoStore *store,
const gchar *action_name);
+_AMTK_EXTERN
void amtk_action_info_store_set_all_accels_to_app (AmtkActionInfoStore *store,
GtkApplication *application);
+_AMTK_EXTERN
void amtk_action_info_store_check_all_used (AmtkActionInfoStore *store);
G_END_DECLS
diff --git a/amtk/amtk-action-info.h b/amtk/amtk-action-info.h
index 8e54fbd..96a4ea7 100644
--- a/amtk/amtk-action-info.h
+++ b/amtk/amtk-action-info.h
@@ -62,46 +62,64 @@ struct _AmtkActionInfoEntry
gpointer padding[3];
};
+_AMTK_EXTERN
GType amtk_action_info_get_type (void) G_GNUC_CONST;
+_AMTK_EXTERN
AmtkActionInfo * amtk_action_info_new (void);
+_AMTK_EXTERN
AmtkActionInfo * amtk_action_info_new_from_entry (const AmtkActionInfoEntry *info_entry,
const gchar
*translation_domain);
+_AMTK_EXTERN
AmtkActionInfo * amtk_action_info_ref (AmtkActionInfo *info);
+_AMTK_EXTERN
void amtk_action_info_unref (AmtkActionInfo *info);
+_AMTK_EXTERN
AmtkActionInfo * amtk_action_info_copy (const AmtkActionInfo *info);
+_AMTK_EXTERN
const gchar * amtk_action_info_get_action_name (const AmtkActionInfo *info);
+_AMTK_EXTERN
void amtk_action_info_set_action_name (AmtkActionInfo *info,
const gchar *action_name);
+_AMTK_EXTERN
const gchar * amtk_action_info_get_icon_name (const AmtkActionInfo *info);
+_AMTK_EXTERN
void amtk_action_info_set_icon_name (AmtkActionInfo *info,
const gchar *icon_name);
+_AMTK_EXTERN
const gchar * amtk_action_info_get_label (const AmtkActionInfo *info);
+_AMTK_EXTERN
void amtk_action_info_set_label (AmtkActionInfo *info,
const gchar *label);
+_AMTK_EXTERN
const gchar * amtk_action_info_get_tooltip (const AmtkActionInfo *info);
+_AMTK_EXTERN
void amtk_action_info_set_tooltip (AmtkActionInfo *info,
const gchar *tooltip);
+_AMTK_EXTERN
const gchar * const * amtk_action_info_get_accels (const AmtkActionInfo *info);
+_AMTK_EXTERN
void amtk_action_info_set_accels (AmtkActionInfo *info,
const gchar * const *accels);
+_AMTK_EXTERN
void amtk_action_info_mark_as_used (AmtkActionInfo *info);
+_AMTK_EXTERN
gboolean amtk_action_info_has_been_used (const AmtkActionInfo *info);
G_END_DECLS
diff --git a/amtk/amtk-action-map.h b/amtk/amtk-action-map.h
index a6a8716..9ee8150 100644
--- a/amtk/amtk-action-map.h
+++ b/amtk/amtk-action-map.h
@@ -25,9 +25,11 @@
#endif
#include <gio/gio.h>
+#include <amtk/amtk-types.h>
G_BEGIN_DECLS
+_AMTK_EXTERN
void amtk_action_map_add_action_entries_check_dups (GActionMap *action_map,
const GActionEntry *entries,
gint n_entries,
diff --git a/amtk/amtk-application-window.h b/amtk/amtk-application-window.h
index 82df8dd..8f6875c 100644
--- a/amtk/amtk-application-window.h
+++ b/amtk/amtk-application-window.h
@@ -53,26 +53,35 @@ struct _AmtkApplicationWindowClass
gpointer padding[12];
};
+_AMTK_EXTERN
GType amtk_application_window_get_type (void) G_GNUC_CONST;
+_AMTK_EXTERN
AmtkApplicationWindow * amtk_application_window_get_from_gtk_application_window (GtkApplicationWindow
*gtk_window);
+_AMTK_EXTERN
GtkApplicationWindow * amtk_application_window_get_application_window (AmtkApplicationWindow
*amtk_window);
+_AMTK_EXTERN
GtkStatusbar * amtk_application_window_get_statusbar (AmtkApplicationWindow
*amtk_window);
+_AMTK_EXTERN
void amtk_application_window_set_statusbar (AmtkApplicationWindow
*amtk_window,
GtkStatusbar
*statusbar);
+_AMTK_EXTERN
void amtk_application_window_connect_menu_to_statusbar (AmtkApplicationWindow
*amtk_window,
GtkMenuShell
*menu_shell);
+_AMTK_EXTERN
void amtk_application_window_connect_recent_chooser_menu_to_statusbar
(AmtkApplicationWindow
*amtk_window,
GtkRecentChooserMenu *menu);
+_AMTK_EXTERN
GtkWidget * amtk_application_window_create_open_recent_menu (AmtkApplicationWindow
*amtk_window);
+_AMTK_EXTERN
GtkWidget * amtk_application_window_create_open_recent_menu_item (AmtkApplicationWindow
*amtk_window);
G_END_DECLS
diff --git a/amtk/amtk-enum-types.h.template b/amtk/amtk-enum-types.h.template
index dbc1c49..3ecb27f 100644
--- a/amtk/amtk-enum-types.h.template
+++ b/amtk/amtk-enum-types.h.template
@@ -7,6 +7,7 @@
#endif
#include <glib-object.h>
+#include <amtk/amtk-types.h>
G_BEGIN_DECLS
@@ -19,7 +20,7 @@ G_BEGIN_DECLS
/*** BEGIN enumeration-production ***/
#define AMTK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
-GType @enum_name@_get_type (void);
+_AMTK_EXTERN GType @enum_name@_get_type (void);
/*** END enumeration-production ***/
diff --git a/amtk/amtk-factory.h b/amtk/amtk-factory.h
index 8aa0ea4..7c57bd5 100644
--- a/amtk/amtk-factory.h
+++ b/amtk/amtk-factory.h
@@ -86,66 +86,86 @@ typedef enum
AMTK_FACTORY_IGNORE_ACCELS_FOR_APP = 1 << 6,
} AmtkFactoryFlags;
+_AMTK_EXTERN
GType amtk_factory_get_type (void);
+_AMTK_EXTERN
AmtkFactory * amtk_factory_new (GtkApplication *application);
+_AMTK_EXTERN
AmtkFactory * amtk_factory_new_with_default_application (void);
+_AMTK_EXTERN
GtkApplication * amtk_factory_get_application (AmtkFactory *factory);
+_AMTK_EXTERN
AmtkFactoryFlags amtk_factory_get_default_flags (AmtkFactory *factory);
+_AMTK_EXTERN
void amtk_factory_set_default_flags (AmtkFactory *factory,
AmtkFactoryFlags default_flags);
+_AMTK_EXTERN
GtkWidget * amtk_factory_create_menu_item (AmtkFactory *factory,
const gchar *action_name);
+_AMTK_EXTERN
GtkWidget * amtk_factory_create_menu_item_full (AmtkFactory *factory,
const gchar *action_name,
AmtkFactoryFlags flags);
+_AMTK_EXTERN
GtkWidget * amtk_factory_create_check_menu_item (AmtkFactory *factory,
const gchar *action_name);
+_AMTK_EXTERN
GtkWidget * amtk_factory_create_check_menu_item_full (AmtkFactory *factory,
const gchar *action_name,
AmtkFactoryFlags flags);
+_AMTK_EXTERN
GtkWidget * amtk_factory_create_simple_menu (AmtkFactory *factory,
const AmtkActionInfoEntry *entries,
gint
n_entries);
+_AMTK_EXTERN
GtkWidget * amtk_factory_create_simple_menu_full (AmtkFactory *factory,
const AmtkActionInfoEntry *entries,
gint n_entries,
AmtkFactoryFlags flags);
+_AMTK_EXTERN
GMenuItem * amtk_factory_create_gmenu_item (AmtkFactory *factory,
const gchar *action_name);
+_AMTK_EXTERN
GMenuItem * amtk_factory_create_gmenu_item_full (AmtkFactory *factory,
const gchar *action_name,
AmtkFactoryFlags flags);
+_AMTK_EXTERN
GtkToolItem * amtk_factory_create_tool_button (AmtkFactory *factory,
const gchar *action_name);
+_AMTK_EXTERN
GtkToolItem * amtk_factory_create_tool_button_full (AmtkFactory *factory,
const gchar *action_name,
AmtkFactoryFlags flags);
+_AMTK_EXTERN
GtkMenuToolButton * amtk_factory_create_menu_tool_button (AmtkFactory *factory,
const gchar *action_name);
+_AMTK_EXTERN
GtkMenuToolButton * amtk_factory_create_menu_tool_button_full (AmtkFactory *factory,
const gchar *action_name,
AmtkFactoryFlags flags);
+_AMTK_EXTERN
GtkWidget * amtk_factory_create_shortcut (AmtkFactory *factory,
const gchar *action_name);
+_AMTK_EXTERN
GtkWidget * amtk_factory_create_shortcut_full (AmtkFactory *factory,
const gchar *action_name,
AmtkFactoryFlags flags);
diff --git a/amtk/amtk-gmenu.h b/amtk/amtk-gmenu.h
index 84dc487..689b4a1 100644
--- a/amtk/amtk-gmenu.h
+++ b/amtk/amtk-gmenu.h
@@ -25,12 +25,15 @@
#endif
#include <gio/gio.h>
+#include <amtk/amtk-types.h>
G_BEGIN_DECLS
+_AMTK_EXTERN
void amtk_gmenu_append_item (GMenu *menu,
GMenuItem *item);
+_AMTK_EXTERN
void amtk_gmenu_append_section (GMenu *menu,
const gchar *label,
GMenu *section);
diff --git a/amtk/amtk-init.h b/amtk/amtk-init.h
index 72e8df9..59638a4 100644
--- a/amtk/amtk-init.h
+++ b/amtk/amtk-init.h
@@ -25,10 +25,13 @@
#endif
#include <glib.h>
+#include <amtk/amtk-types.h>
G_BEGIN_DECLS
+_AMTK_EXTERN
void amtk_init (void);
+_AMTK_EXTERN
void amtk_finalize (void);
G_END_DECLS
diff --git a/amtk/amtk-menu-item.h b/amtk/amtk-menu-item.h
index fec2d79..28aa5b2 100644
--- a/amtk/amtk-menu-item.h
+++ b/amtk/amtk-menu-item.h
@@ -25,14 +25,18 @@
#endif
#include <gtk/gtk.h>
+#include <amtk/amtk-types.h>
G_BEGIN_DECLS
+_AMTK_EXTERN
const gchar * amtk_menu_item_get_long_description (GtkMenuItem *menu_item);
+_AMTK_EXTERN
void amtk_menu_item_set_long_description (GtkMenuItem *menu_item,
const gchar *long_description);
+_AMTK_EXTERN
void amtk_menu_item_set_icon_name (GtkMenuItem *item,
const gchar *icon_name);
diff --git a/amtk/amtk-menu-shell.h b/amtk/amtk-menu-shell.h
index b0f0854..fa24782 100644
--- a/amtk/amtk-menu-shell.h
+++ b/amtk/amtk-menu-shell.h
@@ -61,10 +61,13 @@ struct _AmtkMenuShellClass
gpointer padding[12];
};
+_AMTK_EXTERN
GType amtk_menu_shell_get_type (void) G_GNUC_CONST;
+_AMTK_EXTERN
AmtkMenuShell * amtk_menu_shell_get_from_gtk_menu_shell (GtkMenuShell *gtk_menu_shell);
+_AMTK_EXTERN
GtkMenuShell * amtk_menu_shell_get_menu_shell (AmtkMenuShell *amtk_menu_shell);
G_END_DECLS
diff --git a/amtk/amtk-shortcuts.h b/amtk/amtk-shortcuts.h
index cf9ebb5..24045c8 100644
--- a/amtk/amtk-shortcuts.h
+++ b/amtk/amtk-shortcuts.h
@@ -25,13 +25,17 @@
#endif
#include <gtk/gtk.h>
+#include <amtk/amtk-types.h>
G_BEGIN_DECLS
+_AMTK_EXTERN
GtkShortcutsWindow * amtk_shortcuts_window_new (GtkWindow *parent);
+_AMTK_EXTERN
GtkContainer * amtk_shortcuts_section_new (const gchar *title);
+_AMTK_EXTERN
GtkContainer * amtk_shortcuts_group_new (const gchar *title);
G_END_DECLS
diff --git a/amtk/amtk-utils.h b/amtk/amtk-utils.h
index 5247b16..42c966b 100644
--- a/amtk/amtk-utils.h
+++ b/amtk/amtk-utils.h
@@ -25,6 +25,7 @@
#endif
#include <gtk/gtk.h>
+#include <amtk/amtk-types.h>
G_BEGIN_DECLS
@@ -35,19 +36,23 @@ gchar * _amtk_utils_replace_home_dir_with_tilde (const gchar
*filename);
/* String utilities */
+_AMTK_EXTERN
gchar * amtk_utils_remove_mnemonic (const gchar *str);
/* GTK utilities */
+_AMTK_EXTERN
gchar * amtk_utils_recent_chooser_menu_get_item_uri (GtkRecentChooserMenu *menu,
GtkMenuItem *item);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+_AMTK_EXTERN
void amtk_utils_bind_g_action_to_gtk_action (GActionMap *g_action_map,
const gchar
*detailed_g_action_name_without_prefix,
GtkActionGroup *gtk_action_group,
const gchar *gtk_action_name);
+_AMTK_EXTERN
void amtk_utils_create_gtk_action (GActionMap *g_action_map,
const gchar
*detailed_g_action_name_with_prefix,
GtkActionGroup *gtk_action_group,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]