File: kz-sidebar.h

package info (click to toggle)
kazehakase 0.5.8-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 8,184 kB
  • ctags: 7,837
  • sloc: ansic: 64,119; sh: 19,622; cpp: 12,601; ruby: 1,590; makefile: 1,437; xml: 464
file content (78 lines) | stat: -rw-r--r-- 2,498 bytes parent folder | download
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
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/*
 *  Copyright (C) 2003 Takuro Ashie
 *
 *  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, 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, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifdef HAVE_CONFIG_H
#	include "config.h"
#endif /* HAVE_CONFIG_H */

#include <gtk/gtk.h>

#include "kz-window.h"

#ifndef __KZ_SIDEBAR_H__
#define __KZ_SIDEBAR_H__

#define KZ_TYPE_SIDEBAR			(kz_sidebar_get_type ())
#define KZ_SIDEBAR(obj)			(G_TYPE_CHECK_INSTANCE_CAST ((obj), KZ_TYPE_SIDEBAR, KzSidebar))
#define KZ_SIDEBAR_CLASS(klass)		(G_TYPE_CHECK_CLASS_CAST ((klass), KZ_TYPE_SIDEBAR, KzSidebarClass))
#define KZ_IS_SIDEBAR(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), KZ_TYPE_SIDEBAR))
#define KZ_IS_SIDEBAR_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), KZ_TYPE_SIDEBAR))
#define KZ_SIDEBAR_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), KZ_TYPE_SIDEBAR, KzSidebarClass))

typedef struct _KzSidebar	KzSidebar;
typedef struct _KzSidebarClass	KzSidebarClass;
typedef struct _KzSidebarEntry	KzSidebarEntry;

struct _KzSidebar
{
	GtkVBox parent;

	KzWindow       *kz;

	GtkWidget      *hbox;
	GtkWidget      *option_menu;
	GtkWidget      *close_button;

	GtkWidget      *content;

	KzSidebarEntry *current_entry;
};

struct _KzSidebarClass
{
	GtkVBoxClass parent_class;
};

struct _KzSidebarEntry
{
	gint         priority_hint;
	const gchar *label;
	const gchar *icon; /* icon stock */
	GtkWidget   *(*create) (KzSidebarEntry *entry, KzSidebar *kz);
};

GType	          kz_sidebar_get_type           (void) G_GNUC_CONST;
GtkWidget        *kz_sidebar_new                (KzWindow *kz);
void              kz_sidebar_append_entry       (KzSidebarEntry *entry);
const gchar      *kz_sidebar_get_current        (KzSidebar *sidebar);
gboolean          kz_sidebar_set_current        (KzSidebar *sidebar,
						 const gchar *label);

#endif /* __KZ_SIDEBAR_H__ */