Skip to content

Commit

Permalink
Refactor: DECLARE_DERIVABLE GncTreeModel < GObject
Browse files Browse the repository at this point in the history
  • Loading branch information
richardcohen committed Jun 13, 2023
1 parent 38118a2 commit 80fdffb
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions gnucash/gnome-utils/gnc-tree-model.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,36 +41,17 @@ G_BEGIN_DECLS

/* type macros */
#define GNC_TYPE_TREE_MODEL (gnc_tree_model_get_type ())
#define GNC_TREE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_TREE_MODEL, GncTreeModel))
#define GNC_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_TREE_MODEL, GncTreeModelClass))
#define GNC_IS_TREE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_TREE_MODEL))
#define GNC_IS_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_TREE_MODEL))
#define GNC_TREE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_TREE_MODEL, GncTreeModelClass))
G_DECLARE_DERIVABLE_TYPE (GncTreeModel, gnc_tree_model, GNC, TREE_MODEL, GObject)

#define GNC_TREE_MODEL_NAME "GncTreeModel"

/* typedefs & structures */

/** The instance data structure for a generic tree model. */
typedef struct
{
GObject g_object; /**< The parent object data. */
} GncTreeModel;


/** The class data structure for a generic tree model. */
typedef struct
struct _GncTreeModelClass
{
GObjectClass g_object; /**< The parent object data. */
} GncTreeModelClass;



/** Get the type of a generic tree model plugin.
*
* @return A GType.
*/
GType gnc_tree_model_get_type (void);

};

G_END_DECLS

Expand Down

0 comments on commit 80fdffb

Please sign in to comment.