Commit ee246d67 authored by Christian Hergert's avatar Christian Hergert

libide: remove ide-internal.h

Now that we're linking all the plugins that were using internal
API, we can drop this and avoid using _ide_* in the ABI linker
script.
parent 9aecf0af
......@@ -32,7 +32,6 @@
#include "ide-debug.h"
#include "ide-global.h"
#include "ide-internal.h"
#include "ide-macros.h"
#include "ide-resources.h"
......@@ -42,6 +41,8 @@
#include "application/ide-application-tests.h"
#include "application/ide-application-tool.h"
#include "modelines/modeline-parser.h"
#include "threading/ide-thread-pool.h"
#include "util/ide-battery-monitor.h"
#include "util/ide-flatpak.h"
#include "workbench/ide-workbench.h"
#include "workers/ide-worker.h"
......@@ -449,6 +450,8 @@ ide_application_shutdown (GApplication *application)
dzl_directory_reaper_execute (reaper, NULL, NULL);
}
_ide_battery_monitor_shutdown ();
}
static void
......
......@@ -25,10 +25,10 @@
#include "ide-context.h"
#include "ide-debug.h"
#include "ide-global.h"
#include "ide-internal.h"
#include "buffers/ide-buffer-manager.h"
#include "buffers/ide-buffer.h"
#include "buffers/ide-buffer-private.h"
#include "buffers/ide-unsaved-files.h"
#include "diagnostics/ide-diagnostics-manager.h"
#include "diagnostics/ide-source-location.h"
......
......@@ -23,7 +23,6 @@
#include "ide-context.h"
#include "ide-debug.h"
#include "ide-internal.h"
#include "buffers/ide-buffer-addin.h"
#include "buffers/ide-buffer-change-monitor.h"
......
......@@ -35,6 +35,10 @@ const gchar *ide_unsaved_file_get_temp_path (IdeUnsavedFile *self);
gboolean ide_unsaved_file_persist (IdeUnsavedFile *self,
GCancellable *cancellable,
GError **error);
IdeUnsavedFile *_ide_unsaved_file_new (GFile *file,
GBytes *content,
const gchar *temp_path,
gint64 sequence) G_GNUC_INTERNAL;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (IdeUnsavedFile, ide_unsaved_file_unref)
......
......@@ -27,7 +27,6 @@
#include "ide-context.h"
#include "ide-debug.h"
#include "ide-global.h"
#include "ide-internal.h"
#include "buffers/ide-unsaved-file.h"
#include "buffers/ide-unsaved-files.h"
......
......@@ -22,7 +22,6 @@
#include "ide-context.h"
#include "ide-debug.h"
#include "ide-internal.h"
#include "ide-macros.h"
#include "buildconfig/ide-buildconfig-configuration.h"
......
......@@ -99,6 +99,8 @@ void ide_build_system_get_build_targets_async (IdeBuildSyst
GPtrArray *ide_build_system_get_build_targets_finish (IdeBuildSystem *self,
GAsyncResult *result,
GError **error);
void _ide_build_system_set_project_file (IdeBuildSystem *self,
GFile *project_file) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -23,7 +23,6 @@
#include "ide-context.h"
#include "ide-debug.h"
#include "ide-internal.h"
#include "ide-macros.h"
#include "buildsystem/ide-configuration-manager.h"
......
......@@ -22,7 +22,6 @@
#include "ide-context.h"
#include "ide-debug.h"
#include "ide-internal.h"
#include "buildsystem/ide-configuration.h"
#include "buildsystem/ide-configuration-manager.h"
......
......@@ -65,100 +65,104 @@ struct _IdeConfigurationClass
gpointer _reserved16;
};
IdeConfiguration *ide_configuration_new (IdeContext *context,
const gchar *id,
const gchar *device_id,
const gchar *runtime_id);
const gchar *ide_configuration_get_id (IdeConfiguration *self);
const gchar *ide_configuration_get_runtime_id (IdeConfiguration *self);
void ide_configuration_set_runtime_id (IdeConfiguration *self,
const gchar *runtime_id);
const gchar *ide_configuration_get_device_id (IdeConfiguration *self);
void ide_configuration_set_device_id (IdeConfiguration *self,
const gchar *device_id);
IdeDevice *ide_configuration_get_device (IdeConfiguration *self);
void ide_configuration_set_device (IdeConfiguration *self,
IdeDevice *device);
gboolean ide_configuration_get_dirty (IdeConfiguration *self);
void ide_configuration_set_dirty (IdeConfiguration *self,
gboolean dirty);
const gchar *ide_configuration_get_display_name (IdeConfiguration *self);
void ide_configuration_set_display_name (IdeConfiguration *self,
const gchar *display_name);
gboolean ide_configuration_get_ready (IdeConfiguration *self);
IdeRuntime *ide_configuration_get_runtime (IdeConfiguration *self);
void ide_configuration_set_runtime (IdeConfiguration *self,
IdeRuntime *runtime);
gchar **ide_configuration_get_environ (IdeConfiguration *self);
const gchar *ide_configuration_getenv (IdeConfiguration *self,
const gchar *key);
void ide_configuration_setenv (IdeConfiguration *self,
const gchar *key,
const gchar *value);
gboolean ide_configuration_get_debug (IdeConfiguration *self);
void ide_configuration_set_debug (IdeConfiguration *self,
gboolean debug);
const gchar *ide_configuration_get_prefix (IdeConfiguration *self);
void ide_configuration_set_prefix (IdeConfiguration *self,
const gchar *prefix);
const gchar *ide_configuration_get_config_opts (IdeConfiguration *self);
void ide_configuration_set_config_opts (IdeConfiguration *self,
const gchar *config_opts);
const gchar *ide_configuration_get_run_opts (IdeConfiguration *self);
void ide_configuration_set_run_opts (IdeConfiguration *self,
const gchar *run_opts);
const gchar * const *ide_configuration_get_build_commands (IdeConfiguration *self);
void ide_configuration_set_build_commands (IdeConfiguration *self,
const gchar *const *build_commands);
const gchar * const *ide_configuration_get_post_install_commands (IdeConfiguration *self);
void ide_configuration_set_post_install_commands (IdeConfiguration *self,
const gchar *const *post_install_commands);
gint ide_configuration_get_parallelism (IdeConfiguration *self);
void ide_configuration_set_parallelism (IdeConfiguration *self,
gint parallelism);
IdeEnvironment *ide_configuration_get_environment (IdeConfiguration *self);
void ide_configuration_set_environment (IdeConfiguration *self,
IdeEnvironment *environment);
IdeConfiguration *ide_configuration_duplicate (IdeConfiguration *self);
IdeConfiguration *ide_configuration_snapshot (IdeConfiguration *self);
guint ide_configuration_get_sequence (IdeConfiguration *self);
const gchar *ide_configuration_get_app_id (IdeConfiguration *self);
void ide_configuration_set_app_id (IdeConfiguration *self,
const gchar *app_id);
gboolean ide_configuration_supports_device (IdeConfiguration *self,
IdeDevice *device);
gboolean ide_configuration_supports_runtime (IdeConfiguration *self,
IdeRuntime *runtime);
const gchar *ide_configuration_get_internal_string (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_string (IdeConfiguration *self,
const gchar *key,
const gchar *value);
const gchar * const *ide_configuration_get_internal_strv (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_strv (IdeConfiguration *self,
const gchar *key,
const gchar *const *value);
gboolean ide_configuration_get_internal_boolean (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_boolean (IdeConfiguration *self,
const gchar *key,
gboolean value);
gint ide_configuration_get_internal_int (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_int (IdeConfiguration *self,
const gchar *key,
gint value);
gint64 ide_configuration_get_internal_int64 (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_int64 (IdeConfiguration *self,
const gchar *key,
gint64 value);
gpointer ide_configuration_get_internal_object (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_object (IdeConfiguration *self,
const gchar *key,
gpointer instance);
IdeConfiguration *ide_configuration_new (IdeContext *context,
const gchar *id,
const gchar *device_id,
const gchar *runtime_id);
const gchar *ide_configuration_get_id (IdeConfiguration *self);
const gchar *ide_configuration_get_runtime_id (IdeConfiguration *self);
void ide_configuration_set_runtime_id (IdeConfiguration *self,
const gchar *runtime_id);
const gchar *ide_configuration_get_device_id (IdeConfiguration *self);
void ide_configuration_set_device_id (IdeConfiguration *self,
const gchar *device_id);
IdeDevice *ide_configuration_get_device (IdeConfiguration *self);
void ide_configuration_set_device (IdeConfiguration *self,
IdeDevice *device);
gboolean ide_configuration_get_dirty (IdeConfiguration *self);
void ide_configuration_set_dirty (IdeConfiguration *self,
gboolean dirty);
const gchar *ide_configuration_get_display_name (IdeConfiguration *self);
void ide_configuration_set_display_name (IdeConfiguration *self,
const gchar *display_name);
gboolean ide_configuration_get_ready (IdeConfiguration *self);
IdeRuntime *ide_configuration_get_runtime (IdeConfiguration *self);
void ide_configuration_set_runtime (IdeConfiguration *self,
IdeRuntime *runtime);
gchar **ide_configuration_get_environ (IdeConfiguration *self);
const gchar *ide_configuration_getenv (IdeConfiguration *self,
const gchar *key);
void ide_configuration_setenv (IdeConfiguration *self,
const gchar *key,
const gchar *value);
gboolean ide_configuration_get_debug (IdeConfiguration *self);
void ide_configuration_set_debug (IdeConfiguration *self,
gboolean debug);
const gchar *ide_configuration_get_prefix (IdeConfiguration *self);
void ide_configuration_set_prefix (IdeConfiguration *self,
const gchar *prefix);
const gchar *ide_configuration_get_config_opts (IdeConfiguration *self);
void ide_configuration_set_config_opts (IdeConfiguration *self,
const gchar *config_opts);
const gchar *ide_configuration_get_run_opts (IdeConfiguration *self);
void ide_configuration_set_run_opts (IdeConfiguration *self,
const gchar *run_opts);
const gchar * const *ide_configuration_get_build_commands (IdeConfiguration *self);
void ide_configuration_set_build_commands (IdeConfiguration *self,
const gchar *const *build_commands);
const gchar * const *ide_configuration_get_post_install_commands (IdeConfiguration *self);
void ide_configuration_set_post_install_commands (IdeConfiguration *self,
const gchar *const *post_install_commands);
gint ide_configuration_get_parallelism (IdeConfiguration *self);
void ide_configuration_set_parallelism (IdeConfiguration *self,
gint parallelism);
IdeEnvironment *ide_configuration_get_environment (IdeConfiguration *self);
void ide_configuration_set_environment (IdeConfiguration *self,
IdeEnvironment *environment);
IdeConfiguration *ide_configuration_duplicate (IdeConfiguration *self);
IdeConfiguration *ide_configuration_snapshot (IdeConfiguration *self);
guint ide_configuration_get_sequence (IdeConfiguration *self);
const gchar *ide_configuration_get_app_id (IdeConfiguration *self);
void ide_configuration_set_app_id (IdeConfiguration *self,
const gchar *app_id);
gboolean ide_configuration_supports_device (IdeConfiguration *self,
IdeDevice *device);
gboolean ide_configuration_supports_runtime (IdeConfiguration *self,
IdeRuntime *runtime);
const gchar *ide_configuration_get_internal_string (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_string (IdeConfiguration *self,
const gchar *key,
const gchar *value);
const gchar * const *ide_configuration_get_internal_strv (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_strv (IdeConfiguration *self,
const gchar *key,
const gchar *const *value);
gboolean ide_configuration_get_internal_boolean (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_boolean (IdeConfiguration *self,
const gchar *key,
gboolean value);
gint ide_configuration_get_internal_int (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_int (IdeConfiguration *self,
const gchar *key,
gint value);
gint64 ide_configuration_get_internal_int64 (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_int64 (IdeConfiguration *self,
const gchar *key,
gint64 value);
gpointer ide_configuration_get_internal_object (IdeConfiguration *self,
const gchar *key);
void ide_configuration_set_internal_object (IdeConfiguration *self,
const gchar *key,
gpointer instance);
void _ide_configuration_set_prebuild (IdeConfiguration *self,
IdeBuildCommandQueue *prebuild) G_GNUC_INTERNAL;
void _ide_configuration_set_postbuild (IdeConfiguration *self,
IdeBuildCommandQueue *postbuild) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -21,10 +21,8 @@
#include <ide.h>
#include <string.h>
#include "ide-build-configuration-view.h"
#include "ide-environment-editor.h"
#include "ide-internal.h"
#include "buildui/ide-build-configuration-view.h"
#include "buildui/ide-environment-editor.h"
struct _IdeBuildConfigurationView
{
......
......@@ -20,8 +20,6 @@
#include "dazzle.h"
#include "ide-internal.h"
#include "files/ide-file.h"
#include "diagnostics/ide-diagnostic.h"
#include "diagnostics/ide-source-location.h"
......
......@@ -33,8 +33,8 @@ struct _IdeFixit
DZL_DEFINE_COUNTER (instances, "IdeFixit", "Instances", "Number of fixit instances")
IdeFixit *
_ide_fixit_new (IdeSourceRange *source_range,
const gchar *replacement_text)
ide_fixit_new (IdeSourceRange *source_range,
const gchar *replacement_text)
{
IdeFixit *self;
......
......@@ -25,12 +25,14 @@ G_BEGIN_DECLS
#define IDE_TYPE_FIXIT (ide_fixit_get_type())
IdeFixit *ide_fixit_new (IdeSourceRange *source_range,
const gchar *replacement_text);
GType ide_fixit_get_type (void);
IdeFixit *ide_fixit_ref (IdeFixit *self);
void ide_fixit_unref (IdeFixit *self);
void ide_fixit_apply (IdeFixit *self);
const gchar *ide_fixit_get_text (IdeFixit *self);
IdeSourceRange *ide_fixit_get_range (IdeFixit *self);
IdeFixit *ide_fixit_ref (IdeFixit *self);
void ide_fixit_unref (IdeFixit *self);
void ide_fixit_apply (IdeFixit *self);
const gchar *ide_fixit_get_text (IdeFixit *self);
IdeSourceRange *ide_fixit_get_range (IdeFixit *self);
G_END_DECLS
......
......@@ -20,8 +20,6 @@
#include <glib/gi18n.h>
#include "ide-internal.h"
#include "editor/ide-editor-layout-stack-controls.h"
#include "editor/ide-editor-private.h"
......
......@@ -24,7 +24,6 @@
#include <libpeas/peas.h>
#include <pango/pangofc-fontmap.h>
#include "ide-internal.h"
#include "ide-macros.h"
#include "editor/ide-editor-private.h"
......
......@@ -60,6 +60,10 @@ IdeFile *ide_file_find_other_finish (IdeFile *self,
GError **error);
gint ide_file_compare (const IdeFile *a,
const IdeFile *b);
const gchar *_ide_file_get_content_type (IdeFile *self) G_GNUC_INTERNAL;
void _ide_file_set_content_type (IdeFile *self,
const gchar *content_type) G_GNUC_INTERNAL;
GtkSourceFile *_ide_file_get_source_file (IdeFile *self) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -22,8 +22,8 @@
#include <glib/gi18n.h>
#include <string.h>
#include "ide-context.h"
#include "ide-debug.h"
#include "ide-internal.h"
#include "ide-types.h"
#include "highlighting/ide-highlight-engine.h"
......
......@@ -20,7 +20,6 @@
#include "ide-context.h"
#include "ide-highlighter.h"
#include "ide-internal.h"
G_DEFINE_INTERFACE (IdeHighlighter, ide_highlighter, IDE_TYPE_OBJECT)
......
......@@ -72,12 +72,14 @@ struct _IdeHighlighterInterface
void (*load) (IdeHighlighter *self);
};
void ide_highlighter_load (IdeHighlighter *self);
void ide_highlighter_update (IdeHighlighter *self,
IdeHighlightCallback callback,
const GtkTextIter *range_begin,
const GtkTextIter *range_end,
GtkTextIter *location);
void ide_highlighter_load (IdeHighlighter *self);
void ide_highlighter_update (IdeHighlighter *self,
IdeHighlightCallback callback,
const GtkTextIter *range_begin,
const GtkTextIter *range_end,
GtkTextIter *location);
void _ide_highlighter_set_highlighter_engine (IdeHighlighter *self,
IdeHighlightEngine *highlight_engine) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -24,7 +24,6 @@
#include "ide-context.h"
#include "ide-debug.h"
#include "ide-global.h"
#include "ide-internal.h"
#include "ide-pausable.h"
#include "ide-service.h"
......@@ -546,8 +545,6 @@ ide_context_finalize (GObject *object)
DZL_COUNTER_DEC (instances);
_ide_battery_monitor_shutdown ();
IDE_EXIT;
}
......
......@@ -87,6 +87,8 @@ void ide_context_release (IdeContext
void ide_context_warning (IdeContext *self,
const gchar *format,
...) G_GNUC_PRINTF (2, 3);
GListModel *_ide_context_get_pausables (IdeContext *self) G_GNUC_INTERNAL;
gboolean _ide_context_is_restoring (IdeContext *self) G_GNUC_INTERNAL;
G_END_DECLS
......
/* ide-internal.h
*
* Copyright (C) 2015 Christian Hergert <christian@hergert.me>
*
* 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 3 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/>.
*/
#ifndef IDE_INTERNAL_H
#define IDE_INTERNAL_H
#include <gtksourceview/gtksource.h>
#include "ide-types.h"
#include "buffers/ide-buffer-private.h"
#include "highlighting/ide-highlight-engine.h"
#include "sourceview/ide-source-view-mode.h"
#include "sourceview/ide-source-view.h"
#include "symbols/ide-symbol.h"
#include "util/ide-settings.h"
G_BEGIN_DECLS
void _ide_battery_monitor_init (void);
void _ide_battery_monitor_shutdown (void);
void _ide_build_system_set_project_file (IdeBuildSystem *self,
GFile *project_file);
void _ide_configuration_set_prebuild (IdeConfiguration *self,
IdeBuildCommandQueue *prebuild);
void _ide_configuration_set_postbuild (IdeConfiguration *self,
IdeBuildCommandQueue *postbuild);
gboolean _ide_context_is_restoring (IdeContext *self);
GListModel *_ide_context_get_pausables (IdeContext *self);
const gchar *_ide_file_get_content_type (IdeFile *self);
GtkSourceFile *_ide_file_set_content_type (IdeFile *self,
const gchar *content_type);
GtkSourceFile *_ide_file_get_source_file (IdeFile *self);
IdeFixit *_ide_fixit_new (IdeSourceRange *source_range,
const gchar *replacement_text);
void _ide_project_set_name (IdeProject *project,
const gchar *name);
void _ide_runtime_manager_unload (IdeRuntimeManager *self);
void _ide_service_emit_context_loaded (IdeService *service);
IdeSettings *_ide_settings_new (IdeContext *context,
const gchar *schema_id,
const gchar *relative_path,
gboolean ignore_project_settings);
GtkTextMark *_ide_source_view_get_scroll_mark (IdeSourceView *self);
gboolean _ide_source_view_mode_do_event (IdeSourceViewMode *mode,
GdkEventKey *event,
gboolean *remove);
IdeSourceViewMode *_ide_source_view_mode_new (GtkWidget *view,
const char *mode,
IdeSourceViewModeType type);
void _ide_source_view_set_count (IdeSourceView *self,
gint count);
void _ide_source_view_set_modifier (IdeSourceView *self,
gunichar modifier);
void _ide_thread_pool_init (gboolean is_worker);
IdeUnsavedFile *_ide_unsaved_file_new (GFile *file,
GBytes *content,
const gchar *temp_path,
gint64 sequence);
void _ide_highlighter_set_highlighter_engine (IdeHighlighter *highlighter,
IdeHighlightEngine *highlight_engine);
const gchar *_ide_source_view_get_mode_name (IdeSourceView *self);
G_END_DECLS
#endif /* IDE_INTERNAL_H */
......@@ -37,9 +37,10 @@ struct _IdeServiceInterface
void (*stop) (IdeService *service);
};
const gchar *ide_service_get_name (IdeService *self);
void ide_service_start (IdeService *self);
void ide_service_stop (IdeService *self);
const gchar *ide_service_get_name (IdeService *self);
void ide_service_start (IdeService *self);
void ide_service_stop (IdeService *self);
void _ide_service_emit_context_loaded (IdeService *self) G_GNUC_INTERNAL;
G_END_DECLS
......
{
global:
ide_*;
_ide_*;
local:
*;
};
......@@ -142,10 +142,10 @@ libide_icons_resources = gnome.compile_resources('ide-icons-resources',
)
libide_generated_headers += [libide_icons_resources[1]]
libide_sources = libide_private_sources + libide_generated_headers + libide_public_sources + [
'gconstructor.h',
'ide-internal.h',
]
libide_sources = ['gconstructor.h']
libide_sources += libide_private_sources
libide_sources += libide_generated_headers
libide_sources += libide_public_sources
contrib_dir = join_paths(meson.source_root(), 'contrib/')
......
......@@ -59,6 +59,8 @@ void ide_project_trash_file_async (IdeProject *self,
gboolean ide_project_trash_file_finish (IdeProject *self,
GAsyncResult *result,
GError **error);
void _ide_project_set_name (IdeProject *project,