summaryrefslogtreecommitdiffstats
path: root/libnautilus-extension/nautilus-properties-item.h
blob: c55fb91f08d71bbe45214dcff4f2fd3c734bbb6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 * Copyright (C) 2022 António Fernandes <antoniof@gnome.org>
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#pragma once

#if !defined (NAUTILUS_EXTENSION_H) && !defined (NAUTILUS_COMPILATION)
#warning "Only <nautilus-extension.h> should be included directly."
#endif

#include <glib-object.h>

G_BEGIN_DECLS

#define NAUTILUS_TYPE_PROPERTIES_ITEM (nautilus_properties_item_get_type ())

G_DECLARE_FINAL_TYPE (NautilusPropertiesItem,
                      nautilus_properties_item,
                      NAUTILUS, PROPERTIES_ITEM,
                      GObject)

/**
 * SECTION:nautilus-properties-item
 * @name: NautilusPropertiesItem
 * @value: Properties item descriptor object
 *
 * #NautilusPropertiesItem is an object that describes a name & value pair in
 * file properties. Extensions can provide #NautilusPropertiesItem objects in
 * models provided by #NautilusPropertiesModel.
 */

/**
 * nautilus_properties_item_new:
 * @name: the user-visible name for the properties item.
 * @value: the user-visible value for the properties item.
 *
 * Returns: (transfer full): a new #NautilusPropertiesItem
 */
NautilusPropertiesItem *nautilus_properties_item_new (const char *name,
                                                      const char *value);

/**
 * nautilus_properties_item_get_name:
 * @self: the properties item
 *
 * Returns: (transfer none): the name of this #NautilusPropertiesItem
 */
const char *nautilus_properties_item_get_name (NautilusPropertiesItem *self);

/**
 * nautilus_properties_item_get_value:
 * @self: the properties item
 *
 * Returns: (transfer none): the value of this #NautilusPropertiesItem
 */
const char * nautilus_properties_item_get_value (NautilusPropertiesItem *self);


G_END_DECLS