ide-object.h 3.17 KB
Newer Older
1
2
3
4
/* ide-object.h
 *
 * Copyright (C) 2015 Christian Hergert <christian@hergert.me>
 *
5
6
7
8
 * 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.
9
 *
10
11
12
13
 * 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.
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 *
 * 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_OBJECT_H
#define IDE_OBJECT_H

#include <gio/gio.h>

#include "ide-types.h"

G_BEGIN_DECLS

G_DECLARE_DERIVABLE_TYPE (IdeObject, ide_object, IDE, OBJECT, GObject)

#define IDE_TYPE_OBJECT (ide_object_get_type())

struct _IdeObjectClass
{
  GObjectClass parent;
35

36
37
38
39
  void        (*destroy)     (IdeObject  *self);
  IdeContext *(*get_context) (IdeObject  *self);
  void        (*set_context) (IdeObject  *self,
                              IdeContext *context);
40
41
};

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
IdeContext *ide_object_get_context             (IdeObject            *self);
void        ide_object_set_context             (IdeObject            *self,
                                                IdeContext           *context);
void        ide_object_new_for_extension_async (GType                 interface_gtype,
                                                GCompareDataFunc      sort_priority_func,
                                                gpointer              sort_proirity_data,
                                                int                   io_priority,
                                                GCancellable         *cancellable,
                                                GAsyncReadyCallback   callback,
                                                gpointer              user_data,
                                                const gchar          *first_property,
                                                ...);
void        ide_object_new_async               (const gchar          *extension_point,
                                                int                   io_priority,
                                                GCancellable         *cancellable,
                                                GAsyncReadyCallback   callback,
                                                gpointer              user_data,
                                                const gchar          *first_property,
                                                ...);
IdeObject  *ide_object_new_finish              (GAsyncResult         *result,
                                                GError              **error);
gboolean    ide_object_hold                    (IdeObject            *self);
void        ide_object_release                 (IdeObject            *self);
void        ide_object_notify_in_main          (gpointer              instance,
                                                GParamSpec           *pspec);
67
68
69
70

G_END_DECLS

#endif /* IDE_OBJECT_H */