gio: GLIB_AVAILABLE_IN to more APIs

Useful on its own, but also for a future patch for symbol visibility.

https://bugzilla.gnome.org/show_bug.cgi?id=688681
This commit is contained in:
Ryan Lortie 2012-11-29 09:03:32 -05:00 committed by Colin Walters
parent ce586ba991
commit 52c608dd0d
11 changed files with 76 additions and 0 deletions

View File

@ -77,12 +77,16 @@ struct _GActionEntry
GLIB_AVAILABLE_IN_2_32 GLIB_AVAILABLE_IN_2_32
GType g_action_map_get_type (void) G_GNUC_CONST; GType g_action_map_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_32
GAction * g_action_map_lookup_action (GActionMap *action_map, GAction * g_action_map_lookup_action (GActionMap *action_map,
const gchar *action_name); const gchar *action_name);
GLIB_AVAILABLE_IN_2_32
void g_action_map_add_action (GActionMap *action_map, void g_action_map_add_action (GActionMap *action_map,
GAction *action); GAction *action);
GLIB_AVAILABLE_IN_2_32
void g_action_map_remove_action (GActionMap *action_map, void g_action_map_remove_action (GActionMap *action_map,
const gchar *action_name); const gchar *action_name);
GLIB_AVAILABLE_IN_2_32
void g_action_map_add_action_entries (GActionMap *action_map, void g_action_map_add_action_entries (GActionMap *action_map,
const GActionEntry *entries, const GActionEntry *entries,
gint n_entries, gint n_entries,

View File

@ -151,6 +151,7 @@ int g_application_run (GApplic
int argc, int argc,
char **argv); char **argv);
GLIB_AVAILABLE_IN_2_32
void g_application_quit (GApplication *application); void g_application_quit (GApplication *application);
GLIB_AVAILABLE_IN_2_32 GLIB_AVAILABLE_IN_2_32

View File

@ -39,6 +39,7 @@ gboolean g_content_type_is_unknown (const gchar *type);
gchar * g_content_type_get_description (const gchar *type); gchar * g_content_type_get_description (const gchar *type);
gchar * g_content_type_get_mime_type (const gchar *type); gchar * g_content_type_get_mime_type (const gchar *type);
GIcon * g_content_type_get_icon (const gchar *type); GIcon * g_content_type_get_icon (const gchar *type);
GLIB_AVAILABLE_IN_2_34
GIcon * g_content_type_get_symbolic_icon (const gchar *type); GIcon * g_content_type_get_symbolic_icon (const gchar *type);
GLIB_AVAILABLE_IN_2_34 GLIB_AVAILABLE_IN_2_34
gchar * g_content_type_get_generic_icon_name (const gchar *type); gchar * g_content_type_get_generic_icon_name (const gchar *type);

View File

@ -50,10 +50,15 @@ GDesktopAppInfo *g_desktop_app_info_new_from_keyfile (GKeyFile *key_file
const char * g_desktop_app_info_get_filename (GDesktopAppInfo *info); const char * g_desktop_app_info_get_filename (GDesktopAppInfo *info);
GLIB_AVAILABLE_IN_2_30
const char * g_desktop_app_info_get_generic_name (GDesktopAppInfo *info); const char * g_desktop_app_info_get_generic_name (GDesktopAppInfo *info);
GLIB_AVAILABLE_IN_2_30
const char * g_desktop_app_info_get_categories (GDesktopAppInfo *info); const char * g_desktop_app_info_get_categories (GDesktopAppInfo *info);
GLIB_AVAILABLE_IN_2_30
const char * const *g_desktop_app_info_get_keywords (GDesktopAppInfo *info); const char * const *g_desktop_app_info_get_keywords (GDesktopAppInfo *info);
GLIB_AVAILABLE_IN_2_30
gboolean g_desktop_app_info_get_nodisplay (GDesktopAppInfo *info); gboolean g_desktop_app_info_get_nodisplay (GDesktopAppInfo *info);
GLIB_AVAILABLE_IN_2_30
gboolean g_desktop_app_info_get_show_in (GDesktopAppInfo *info, gboolean g_desktop_app_info_get_show_in (GDesktopAppInfo *info,
const gchar *desktop_env); const gchar *desktop_env);
GLIB_AVAILABLE_IN_2_34 GLIB_AVAILABLE_IN_2_34
@ -129,6 +134,7 @@ typedef void (*GDesktopAppLaunchCallback) (GDesktopAppInfo *appinfo,
GPid pid, GPid pid,
gpointer user_data); gpointer user_data);
GLIB_AVAILABLE_IN_2_28
gboolean g_desktop_app_info_launch_uris_as_manager (GDesktopAppInfo *appinfo, gboolean g_desktop_app_info_launch_uris_as_manager (GDesktopAppInfo *appinfo,
GList *uris, GList *uris,
GAppLaunchContext *launch_context, GAppLaunchContext *launch_context,

View File

@ -64,14 +64,20 @@ GInetAddressMask *g_inet_address_mask_new (GInetAddress *addr,
GLIB_AVAILABLE_IN_2_32 GLIB_AVAILABLE_IN_2_32
GInetAddressMask *g_inet_address_mask_new_from_string (const gchar *mask_string, GInetAddressMask *g_inet_address_mask_new_from_string (const gchar *mask_string,
GError **error); GError **error);
GLIB_AVAILABLE_IN_2_32
gchar *g_inet_address_mask_to_string (GInetAddressMask *mask); gchar *g_inet_address_mask_to_string (GInetAddressMask *mask);
GLIB_AVAILABLE_IN_2_32
GSocketFamily g_inet_address_mask_get_family (GInetAddressMask *mask); GSocketFamily g_inet_address_mask_get_family (GInetAddressMask *mask);
GLIB_AVAILABLE_IN_2_32
GInetAddress *g_inet_address_mask_get_address (GInetAddressMask *mask); GInetAddress *g_inet_address_mask_get_address (GInetAddressMask *mask);
GLIB_AVAILABLE_IN_2_32
guint g_inet_address_mask_get_length (GInetAddressMask *mask); guint g_inet_address_mask_get_length (GInetAddressMask *mask);
GLIB_AVAILABLE_IN_2_32
gboolean g_inet_address_mask_matches (GInetAddressMask *mask, gboolean g_inet_address_mask_matches (GInetAddressMask *mask,
GInetAddress *address); GInetAddress *address);
GLIB_AVAILABLE_IN_2_32
gboolean g_inet_address_mask_equal (GInetAddressMask *mask, gboolean g_inet_address_mask_equal (GInetAddressMask *mask,
GInetAddressMask *mask2); GInetAddressMask *mask2);

View File

@ -34,8 +34,11 @@ G_BEGIN_DECLS
typedef struct _GIOModuleScope GIOModuleScope; typedef struct _GIOModuleScope GIOModuleScope;
GLIB_AVAILABLE_IN_2_30
GIOModuleScope * g_io_module_scope_new (GIOModuleScopeFlags flags); GIOModuleScope * g_io_module_scope_new (GIOModuleScopeFlags flags);
GLIB_AVAILABLE_IN_2_30
void g_io_module_scope_free (GIOModuleScope *scope); void g_io_module_scope_free (GIOModuleScope *scope);
GLIB_AVAILABLE_IN_2_30
void g_io_module_scope_block (GIOModuleScope *scope, void g_io_module_scope_block (GIOModuleScope *scope,
const gchar *basename); const gchar *basename);
@ -59,8 +62,10 @@ GIOModule *g_io_module_new (const gchar
void g_io_modules_scan_all_in_directory (const char *dirname); void g_io_modules_scan_all_in_directory (const char *dirname);
GList *g_io_modules_load_all_in_directory (const gchar *dirname); GList *g_io_modules_load_all_in_directory (const gchar *dirname);
GLIB_AVAILABLE_IN_2_30
void g_io_modules_scan_all_in_directory_with_scope (const gchar *dirname, void g_io_modules_scan_all_in_directory_with_scope (const gchar *dirname,
GIOModuleScope *scope); GIOModuleScope *scope);
GLIB_AVAILABLE_IN_2_30
GList *g_io_modules_load_all_in_directory_with_scope (const gchar *dirname, GList *g_io_modules_load_all_in_directory_with_scope (const gchar *dirname,
GIOModuleScope *scope); GIOModuleScope *scope);

View File

@ -46,53 +46,69 @@ GType g_menu_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_32 GLIB_AVAILABLE_IN_2_32
GMenu * g_menu_new (void); GMenu * g_menu_new (void);
GLIB_AVAILABLE_IN_2_32
void g_menu_freeze (GMenu *menu); void g_menu_freeze (GMenu *menu);
GLIB_AVAILABLE_IN_2_32
void g_menu_insert_item (GMenu *menu, void g_menu_insert_item (GMenu *menu,
gint position, gint position,
GMenuItem *item); GMenuItem *item);
GLIB_AVAILABLE_IN_2_32
void g_menu_prepend_item (GMenu *menu, void g_menu_prepend_item (GMenu *menu,
GMenuItem *item); GMenuItem *item);
GLIB_AVAILABLE_IN_2_32
void g_menu_append_item (GMenu *menu, void g_menu_append_item (GMenu *menu,
GMenuItem *item); GMenuItem *item);
GLIB_AVAILABLE_IN_2_32
void g_menu_remove (GMenu *menu, void g_menu_remove (GMenu *menu,
gint position); gint position);
GLIB_AVAILABLE_IN_2_32
void g_menu_insert (GMenu *menu, void g_menu_insert (GMenu *menu,
gint position, gint position,
const gchar *label, const gchar *label,
const gchar *detailed_action); const gchar *detailed_action);
GLIB_AVAILABLE_IN_2_32
void g_menu_prepend (GMenu *menu, void g_menu_prepend (GMenu *menu,
const gchar *label, const gchar *label,
const gchar *detailed_action); const gchar *detailed_action);
GLIB_AVAILABLE_IN_2_32
void g_menu_append (GMenu *menu, void g_menu_append (GMenu *menu,
const gchar *label, const gchar *label,
const gchar *detailed_action); const gchar *detailed_action);
GLIB_AVAILABLE_IN_2_32
void g_menu_insert_section (GMenu *menu, void g_menu_insert_section (GMenu *menu,
gint position, gint position,
const gchar *label, const gchar *label,
GMenuModel *section); GMenuModel *section);
GLIB_AVAILABLE_IN_2_32
void g_menu_prepend_section (GMenu *menu, void g_menu_prepend_section (GMenu *menu,
const gchar *label, const gchar *label,
GMenuModel *section); GMenuModel *section);
GLIB_AVAILABLE_IN_2_32
void g_menu_append_section (GMenu *menu, void g_menu_append_section (GMenu *menu,
const gchar *label, const gchar *label,
GMenuModel *section); GMenuModel *section);
GLIB_AVAILABLE_IN_2_32
void g_menu_insert_submenu (GMenu *menu, void g_menu_insert_submenu (GMenu *menu,
gint position, gint position,
const gchar *label, const gchar *label,
GMenuModel *submenu); GMenuModel *submenu);
GLIB_AVAILABLE_IN_2_32
void g_menu_prepend_submenu (GMenu *menu, void g_menu_prepend_submenu (GMenu *menu,
const gchar *label, const gchar *label,
GMenuModel *submenu); GMenuModel *submenu);
GLIB_AVAILABLE_IN_2_32
void g_menu_append_submenu (GMenu *menu, void g_menu_append_submenu (GMenu *menu,
const gchar *label, const gchar *label,
GMenuModel *submenu); GMenuModel *submenu);
GLIB_AVAILABLE_IN_2_32
GType g_menu_item_get_type (void) G_GNUC_CONST; GType g_menu_item_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_32
GMenuItem * g_menu_item_new (const gchar *label, GMenuItem * g_menu_item_new (const gchar *label,
const gchar *detailed_action); const gchar *detailed_action);
@ -100,9 +116,11 @@ GLIB_AVAILABLE_IN_2_34
GMenuItem * g_menu_item_new_from_model (GMenuModel *model, GMenuItem * g_menu_item_new_from_model (GMenuModel *model,
gint item_index); gint item_index);
GLIB_AVAILABLE_IN_2_32
GMenuItem * g_menu_item_new_submenu (const gchar *label, GMenuItem * g_menu_item_new_submenu (const gchar *label,
GMenuModel *submenu); GMenuModel *submenu);
GLIB_AVAILABLE_IN_2_32
GMenuItem * g_menu_item_new_section (const gchar *label, GMenuItem * g_menu_item_new_section (const gchar *label,
GMenuModel *section); GMenuModel *section);
@ -119,29 +137,38 @@ GLIB_AVAILABLE_IN_2_34
GMenuModel *g_menu_item_get_link (GMenuItem *menu_item, GMenuModel *g_menu_item_get_link (GMenuItem *menu_item,
const gchar *link); const gchar *link);
GLIB_AVAILABLE_IN_2_32
void g_menu_item_set_attribute_value (GMenuItem *menu_item, void g_menu_item_set_attribute_value (GMenuItem *menu_item,
const gchar *attribute, const gchar *attribute,
GVariant *value); GVariant *value);
GLIB_AVAILABLE_IN_2_32
void g_menu_item_set_attribute (GMenuItem *menu_item, void g_menu_item_set_attribute (GMenuItem *menu_item,
const gchar *attribute, const gchar *attribute,
const gchar *format_string, const gchar *format_string,
...); ...);
GLIB_AVAILABLE_IN_2_32
void g_menu_item_set_link (GMenuItem *menu_item, void g_menu_item_set_link (GMenuItem *menu_item,
const gchar *link, const gchar *link,
GMenuModel *model); GMenuModel *model);
GLIB_AVAILABLE_IN_2_32
void g_menu_item_set_label (GMenuItem *menu_item, void g_menu_item_set_label (GMenuItem *menu_item,
const gchar *label); const gchar *label);
GLIB_AVAILABLE_IN_2_32
void g_menu_item_set_submenu (GMenuItem *menu_item, void g_menu_item_set_submenu (GMenuItem *menu_item,
GMenuModel *submenu); GMenuModel *submenu);
GLIB_AVAILABLE_IN_2_32
void g_menu_item_set_section (GMenuItem *menu_item, void g_menu_item_set_section (GMenuItem *menu_item,
GMenuModel *section); GMenuModel *section);
GLIB_AVAILABLE_IN_2_32
void g_menu_item_set_action_and_target_value (GMenuItem *menu_item, void g_menu_item_set_action_and_target_value (GMenuItem *menu_item,
const gchar *action, const gchar *action,
GVariant *target_value); GVariant *target_value);
GLIB_AVAILABLE_IN_2_32
void g_menu_item_set_action_and_target (GMenuItem *menu_item, void g_menu_item_set_action_and_target (GMenuItem *menu_item,
const gchar *action, const gchar *action,
const gchar *format_string, const gchar *format_string,
...); ...);
GLIB_AVAILABLE_IN_2_32
void g_menu_item_set_detailed_action (GMenuItem *menu_item, void g_menu_item_set_detailed_action (GMenuItem *menu_item,
const gchar *detailed_action); const gchar *detailed_action);

View File

@ -89,28 +89,37 @@ struct _GMenuModelClass
const gchar *link); const gchar *link);
}; };
GLIB_AVAILABLE_IN_2_32
GType g_menu_model_get_type (void) G_GNUC_CONST; GType g_menu_model_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_32
gboolean g_menu_model_is_mutable (GMenuModel *model); gboolean g_menu_model_is_mutable (GMenuModel *model);
GLIB_AVAILABLE_IN_2_32
gint g_menu_model_get_n_items (GMenuModel *model); gint g_menu_model_get_n_items (GMenuModel *model);
GLIB_AVAILABLE_IN_2_32
GMenuAttributeIter * g_menu_model_iterate_item_attributes (GMenuModel *model, GMenuAttributeIter * g_menu_model_iterate_item_attributes (GMenuModel *model,
gint item_index); gint item_index);
GLIB_AVAILABLE_IN_2_32
GVariant * g_menu_model_get_item_attribute_value (GMenuModel *model, GVariant * g_menu_model_get_item_attribute_value (GMenuModel *model,
gint item_index, gint item_index,
const gchar *attribute, const gchar *attribute,
const GVariantType *expected_type); const GVariantType *expected_type);
GLIB_AVAILABLE_IN_2_32
gboolean g_menu_model_get_item_attribute (GMenuModel *model, gboolean g_menu_model_get_item_attribute (GMenuModel *model,
gint item_index, gint item_index,
const gchar *attribute, const gchar *attribute,
const gchar *format_string, const gchar *format_string,
...); ...);
GLIB_AVAILABLE_IN_2_32
GMenuLinkIter * g_menu_model_iterate_item_links (GMenuModel *model, GMenuLinkIter * g_menu_model_iterate_item_links (GMenuModel *model,
gint item_index); gint item_index);
GLIB_AVAILABLE_IN_2_32
GMenuModel * g_menu_model_get_item_link (GMenuModel *model, GMenuModel * g_menu_model_get_item_link (GMenuModel *model,
gint item_index, gint item_index,
const gchar *link); const gchar *link);
GLIB_AVAILABLE_IN_2_32
void g_menu_model_items_changed (GMenuModel *model, void g_menu_model_items_changed (GMenuModel *model,
gint position, gint position,
gint removed, gint removed,
@ -144,13 +153,18 @@ struct _GMenuAttributeIterClass
GVariant **value); GVariant **value);
}; };
GLIB_AVAILABLE_IN_2_32
GType g_menu_attribute_iter_get_type (void) G_GNUC_CONST; GType g_menu_attribute_iter_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_32
gboolean g_menu_attribute_iter_get_next (GMenuAttributeIter *iter, gboolean g_menu_attribute_iter_get_next (GMenuAttributeIter *iter,
const gchar **out_name, const gchar **out_name,
GVariant **value); GVariant **value);
GLIB_AVAILABLE_IN_2_32
gboolean g_menu_attribute_iter_next (GMenuAttributeIter *iter); gboolean g_menu_attribute_iter_next (GMenuAttributeIter *iter);
GLIB_AVAILABLE_IN_2_32
const gchar * g_menu_attribute_iter_get_name (GMenuAttributeIter *iter); const gchar * g_menu_attribute_iter_get_name (GMenuAttributeIter *iter);
GLIB_AVAILABLE_IN_2_32
GVariant * g_menu_attribute_iter_get_value (GMenuAttributeIter *iter); GVariant * g_menu_attribute_iter_get_value (GMenuAttributeIter *iter);
@ -181,13 +195,18 @@ struct _GMenuLinkIterClass
GMenuModel **value); GMenuModel **value);
}; };
GLIB_AVAILABLE_IN_2_32
GType g_menu_link_iter_get_type (void) G_GNUC_CONST; GType g_menu_link_iter_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_32
gboolean g_menu_link_iter_get_next (GMenuLinkIter *iter, gboolean g_menu_link_iter_get_next (GMenuLinkIter *iter,
const gchar **out_link, const gchar **out_link,
GMenuModel **value); GMenuModel **value);
GLIB_AVAILABLE_IN_2_32
gboolean g_menu_link_iter_next (GMenuLinkIter *iter); gboolean g_menu_link_iter_next (GMenuLinkIter *iter);
GLIB_AVAILABLE_IN_2_32
const gchar * g_menu_link_iter_get_name (GMenuLinkIter *iter); const gchar * g_menu_link_iter_get_name (GMenuLinkIter *iter);
GLIB_AVAILABLE_IN_2_32
GMenuModel * g_menu_link_iter_get_value (GMenuLinkIter *iter); GMenuModel * g_menu_link_iter_get_value (GMenuLinkIter *iter);
G_END_DECLS G_END_DECLS

View File

@ -47,6 +47,7 @@ G_BEGIN_DECLS
* error domains. * error domains.
*/ */
#define G_RESOURCE_ERROR (g_resource_error_quark ()) #define G_RESOURCE_ERROR (g_resource_error_quark ())
GLIB_AVAILABLE_IN_2_32
GQuark g_resource_error_quark (void); GQuark g_resource_error_quark (void);
typedef struct _GStaticResource GStaticResource; typedef struct _GStaticResource GStaticResource;
@ -64,6 +65,7 @@ GType g_resource_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_32 GLIB_AVAILABLE_IN_2_32
GResource * g_resource_new_from_data (GBytes *data, GResource * g_resource_new_from_data (GBytes *data,
GError **error); GError **error);
GLIB_AVAILABLE_IN_2_32
GResource * g_resource_ref (GResource *resource); GResource * g_resource_ref (GResource *resource);
GLIB_AVAILABLE_IN_2_32 GLIB_AVAILABLE_IN_2_32
void g_resource_unref (GResource *resource); void g_resource_unref (GResource *resource);

View File

@ -37,11 +37,13 @@ GSettingsSchemaSource * g_settings_schema_source_ref (GSettin
GLIB_AVAILABLE_IN_2_32 GLIB_AVAILABLE_IN_2_32
void g_settings_schema_source_unref (GSettingsSchemaSource *source); void g_settings_schema_source_unref (GSettingsSchemaSource *source);
GLIB_AVAILABLE_IN_2_32
GSettingsSchemaSource * g_settings_schema_source_new_from_directory (const gchar *directory, GSettingsSchemaSource * g_settings_schema_source_new_from_directory (const gchar *directory,
GSettingsSchemaSource *parent, GSettingsSchemaSource *parent,
gboolean trusted, gboolean trusted,
GError **error); GError **error);
GLIB_AVAILABLE_IN_2_32
GSettingsSchema * g_settings_schema_source_lookup (GSettingsSchemaSource *source, GSettingsSchema * g_settings_schema_source_lookup (GSettingsSchemaSource *source,
const gchar *schema_id, const gchar *schema_id,
gboolean recursive); gboolean recursive);
@ -55,7 +57,9 @@ GSettingsSchema * g_settings_schema_ref (GSettin
GLIB_AVAILABLE_IN_2_32 GLIB_AVAILABLE_IN_2_32
void g_settings_schema_unref (GSettingsSchema *schema); void g_settings_schema_unref (GSettingsSchema *schema);
GLIB_AVAILABLE_IN_2_32
const gchar * g_settings_schema_get_id (GSettingsSchema *schema); const gchar * g_settings_schema_get_id (GSettingsSchema *schema);
GLIB_AVAILABLE_IN_2_32
const gchar * g_settings_schema_get_path (GSettingsSchema *schema); const gchar * g_settings_schema_get_path (GSettingsSchema *schema);
#endif /* __G_SETTINGS_SCHEMA_H__ */ #endif /* __G_SETTINGS_SCHEMA_H__ */

View File

@ -48,6 +48,7 @@ GSimpleAction * g_simple_action_new_stateful (const g
void g_simple_action_set_enabled (GSimpleAction *simple, void g_simple_action_set_enabled (GSimpleAction *simple,
gboolean enabled); gboolean enabled);
GLIB_AVAILABLE_IN_2_30
void g_simple_action_set_state (GSimpleAction *simple, void g_simple_action_set_state (GSimpleAction *simple,
GVariant *value); GVariant *value);