File: seahorse-widget.h

package info (click to toggle)
caja-seahorse 1.18.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,876 kB
  • sloc: ansic: 4,278; xml: 469; makefile: 134; sh: 15
file content (92 lines) | stat: -rw-r--r-- 3,184 bytes parent folder | download | duplicates (10)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*
 * Seahorse
 *
 * Copyright (C) 2003 Jacob Perkins
 * Copyright (C) 2005 Stefan Walter
 *
 * 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 2 of the License, or
 * (at your option) any later version.
 *
 * 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.
 * 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 __SEAHORSE_WIDGET_H__
#define __SEAHORSE_WIDGET_H__

#include <glib.h>
#include <gtk/gtk.h>

#define SEAHORSE_TYPE_WIDGET            (seahorse_widget_get_type ())
#define SEAHORSE_WIDGET(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAHORSE_TYPE_WIDGET, SeahorseWidget))
#define SEAHORSE_WIDGET_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), SEAHORSE_TYPE_WIDGET, SeahorseWidgetClass))
#define SEAHORSE_IS_WIDGET(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SEAHORSE_TYPE_WIDGET))
#define SEAHORSE_IS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SEAHORSE_TYPE_WIDGET))
#define SEAHORSE_WIDGET_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), SEAHORSE_TYPE_WIDGET, SeahorseWidgetClass))

typedef struct _SeahorseWidget SeahorseWidget;
typedef struct _SeahorseWidgetClass SeahorseWidgetClass;

/**
 * SeahorseWidget:
 * @parent: The parent #GtkObject
 * @gtkbuilder: The #GtkBuilder object for the #SeahorseWidget
 * @name: The name of the gtkbuilder file
 *
 * A window created from a gtkbuilder file.
 *
 * - All SeahorseWidget objects are destroyed when the SeahorseContext
 *   goes bye-bye.
 * - Implements fun GtkUIManager stuff.
 *
 * Signals:
 *   destroy: The window was destroyed.
 *
 * Properties:
 *   name: (gchar*) The name of the gtkbuilder file to load.
 */

struct _SeahorseWidget {
	GObject parent;

	/*< public >*/
	GtkBuilder *gtkbuilder;
	gchar *name;

	/*< private >*/
	gboolean destroying;
	gboolean in_destruction;
	GSettings *settings;
};

struct _SeahorseWidgetClass {
	GObjectClass parent_class;

	/*< signals >*/
	void (*destroy) (SeahorseWidget *swidget);
};

GType            seahorse_widget_get_type (void) G_GNUC_CONST;

SeahorseWidget*  seahorse_widget_new                (const gchar      *name,
                                                     GtkWindow        *parent);

SeahorseWidget*  seahorse_widget_new_allow_multiple (const gchar      *name,
                                                     GtkWindow        *parent);

SeahorseWidget*  seahorse_widget_find               (const gchar      *name);

GtkWidget*       seahorse_widget_get_toplevel       (SeahorseWidget   *swidget);

GtkWidget*       seahorse_widget_get_widget         (SeahorseWidget   *swidget,
                                                     const char       *identifier);

void             seahorse_widget_destroy            (SeahorseWidget   *swidget);

#endif /* __SEAHORSE_WIDGET_H__ */