libsysprof-analyze: move to internal types for documents

We want to have an object hierarchy, but we don't want to expose our class
or other internal details to the public API/ABI. This uses the old form of
class definition so we can maintain that.

An alternative would be to do what GDK does for internal types, should we
find that easier to maintain going forward.
This commit is contained in:
Christian Hergert
2023-04-25 16:19:54 -07:00
parent a5dafa5409
commit e9d5cb733d
3 changed files with 32 additions and 32 deletions

View File

@ -24,11 +24,16 @@
G_BEGIN_DECLS
#define SYSPROF_TYPE_DOCUMENT_FRAME (sysprof_document_frame_get_type())
#define SYSPROF_TYPE_DOCUMENT_FRAME (sysprof_document_frame_get_type())
#define SYSPROF_IS_DOCUMENT_FRAME(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, SYSPROF_TYPE_DOCUMENT_FRAME)
#define SYSPROF_DOCUMENT_FRAME(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, SYSPROF_TYPE_DOCUMENT_FRAME, SysprofDocumentFrame)
#define SYSPROF_DOCUMENT_FRAME_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass, SYSPROF_TYPE_DOCUMENT_FRAME, SysprofDocumentFrameClass)
typedef struct _SysprofDocumentFrame SysprofDocumentFrame;
typedef struct _SysprofDocumentFrameClass SysprofDocumentFrameClass;
SYSPROF_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (SysprofDocumentFrame, sysprof_document_frame, SYSPROF, DOCUMENT_FRAME, GObject)
GType sysprof_document_frame_get_type (void) G_GNUC_CONST;
SYSPROF_AVAILABLE_IN_ALL
int sysprof_document_frame_get_cpu (SysprofDocumentFrame *self);
SYSPROF_AVAILABLE_IN_ALL