1 /* ide-buffer-private.h
2  *
3  * Copyright 2018-2019 Christian Hergert <chergert@redhat.com>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  *
18  * SPDX-License-Identifier: GPL-3.0-or-later
19  */
20 
21 #pragma once
22 
23 #include <libide-core.h>
24 #include <libide-plugins.h>
25 
26 #include "ide-buffer.h"
27 #include "ide-buffer-manager.h"
28 #include "ide-highlight-engine.h"
29 
30 G_BEGIN_DECLS
31 
32 void                    _ide_buffer_manager_buffer_loaded    (IdeBufferManager     *self,
33                                                               IdeBuffer            *buffer);
34 void                    _ide_buffer_manager_buffer_saved     (IdeBufferManager     *self,
35                                                               IdeBuffer            *buffer);
36 void                    _ide_buffer_cancel_cursor_restore    (IdeBuffer            *self);
37 gboolean                _ide_buffer_can_restore_cursor       (IdeBuffer            *self);
38 IdeExtensionSetAdapter *_ide_buffer_get_addins               (IdeBuffer            *self);
39 IdeBuffer              *_ide_buffer_new                      (IdeBufferManager     *self,
40                                                               GFile                *file,
41                                                               gboolean              enable_addins,
42                                                               gboolean              is_temporary);
43 void                    _ide_buffer_attach                   (IdeBuffer            *self,
44                                                               IdeObject            *parent);
45 gboolean                _ide_buffer_is_file                  (IdeBuffer            *self,
46                                                               GFile                *nolink_file);
47 void                    _ide_buffer_load_file_async          (IdeBuffer            *self,
48                                                               IdeNotification      *notif,
49                                                               GCancellable         *cancellable,
50                                                               GAsyncReadyCallback   callback,
51                                                               gpointer              user_data);
52 gboolean                _ide_buffer_load_file_finish         (IdeBuffer            *self,
53                                                               GAsyncResult         *result,
54                                                               GError              **error);
55 void                    _ide_buffer_line_flags_changed       (IdeBuffer            *self);
56 void                    _ide_buffer_set_changed_on_volume    (IdeBuffer            *self,
57                                                               gboolean              changed_on_volume);
58 void                    _ide_buffer_set_read_only            (IdeBuffer            *self,
59                                                               gboolean              read_only);
60 IdeHighlightEngine     *_ide_buffer_get_highlight_engine     (IdeBuffer            *self);
61 void                    _ide_buffer_set_failure              (IdeBuffer            *self,
62                                                               const GError         *error);
63 void                    _ide_buffer_sync_to_unsaved_files    (IdeBuffer            *self);
64 void                    _ide_buffer_set_file                 (IdeBuffer            *self,
65                                                               GFile                *file);
66 void                    _ide_buffer_request_scroll_to_cursor (IdeBuffer            *self);
67 
68 G_END_DECLS
69