diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2018-02-01 13:41:39 +0200 |
---|---|---|
committer | Ernestas Kulik <ernestask@gnome.org> | 2018-02-09 06:32:38 +0200 |
commit | 7e2605c681d065e6b0a3d779c30b892932597991 (patch) | |
tree | 44bccc88603a7cc530a80de6349df69d3413a148 /libnautilus-extension/nautilus-column.h | |
parent | 2128efccae664ba12a870deb1720a08e58954dd2 (diff) | |
download | nautilus-7e2605c681d065e6b0a3d779c30b892932597991.tar.gz |
general: refactor extension library
The changes include:
* adding a single-include header and deprecating
nautilus-extension-types.h and direct inclusions of individual
headers;
* type definition simplifications - this causes some breakages in
nautilus-file, because NautilusFile used to be typedefed to
NautilusFileInfo, and that is no longer possible, so the interface
implementation was moved to static functions and the public
NautilusFile API provides thin wrappers for them to maintain
compatibility;
* documentation cleanups and reorganization;
* general build rule and code cleanups: mostly g_auto* sprinkled
around and style changes (sorry)
Diffstat (limited to 'libnautilus-extension/nautilus-column.h')
-rw-r--r-- | libnautilus-extension/nautilus-column.h | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/libnautilus-extension/nautilus-column.h b/libnautilus-extension/nautilus-column.h index 64de2cb77..c4e3ad9af 100644 --- a/libnautilus-extension/nautilus-column.h +++ b/libnautilus-extension/nautilus-column.h @@ -24,37 +24,22 @@ #ifndef NAUTILUS_COLUMN_H #define NAUTILUS_COLUMN_H +#if !defined (NAUTILUS_EXTENSION_H) && !defined (NAUTILUS_COMPILATION) +#warning "Only <nautilus-extension.h> should be included directly." +#endif + #include <glib-object.h> -#include "nautilus-extension-types.h" G_BEGIN_DECLS -#define NAUTILUS_TYPE_COLUMN (nautilus_column_get_type()) -#define NAUTILUS_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_COLUMN, NautilusColumn)) -#define NAUTILUS_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_COLUMN, NautilusColumnClass)) -#define NAUTILUS_INFO_IS_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_COLUMN)) -#define NAUTILUS_INFO_IS_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NAUTILUS_TYPE_COLUMN)) -#define NAUTILUS_COLUMN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NAUTILUS_TYPE_COLUMN, NautilusColumnClass)) - -typedef struct _NautilusColumn NautilusColumn; -typedef struct _NautilusColumnDetails NautilusColumnDetails; -typedef struct _NautilusColumnClass NautilusColumnClass; - -struct _NautilusColumn { - GObject parent; - - NautilusColumnDetails *details; -}; +#define NAUTILUS_TYPE_COLUMN (nautilus_column_get_type()) -struct _NautilusColumnClass { - GObjectClass parent; -}; +G_DECLARE_FINAL_TYPE (NautilusColumn, nautilus_column, NAUTILUS, COLUMN, GObject) -GType nautilus_column_get_type (void); -NautilusColumn * nautilus_column_new (const char *name, - const char *attribute, - const char *label, - const char *description); +NautilusColumn *nautilus_column_new (const char *name, + const char *attribute, + const char *label, + const char *description); /* NautilusColumn has the following properties: * name (string) - the identifier for the column |