File: giggle-git-config.h

package info (click to toggle)
giggle 0.7-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,084 kB
  • sloc: ansic: 23,243; sh: 11,642; makefile: 442; xml: 81
file content (96 lines) | stat: -rw-r--r-- 4,091 bytes parent folder | download | duplicates (4)
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
93
94
95
96
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Copyright (C) 2007 Imendio AB
 *
 * 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 __GIGGLE_GIT_CONFIG_H__
#define __GIGGLE_GIT_CONFIG_H__

#include <libgiggle/giggle-job.h>

G_BEGIN_DECLS

#define GIGGLE_TYPE_GIT_CONFIG            (giggle_git_config_get_type ())
#define GIGGLE_GIT_CONFIG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIGGLE_TYPE_GIT_CONFIG, GiggleGitConfig))
#define GIGGLE_GIT_CONFIG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GIGGLE_TYPE_GIT_CONFIG, GiggleGitConfigClass))
#define GIGGLE_IS_GIT_CONFIG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIGGLE_TYPE_GIT_CONFIG))
#define GIGGLE_IS_GIT_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GIGGLE_TYPE_GIT_CONFIG))
#define GIGGLE_GIT_CONFIG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GIGGLE_TYPE_GIT_CONFIG, GiggleGitConfigClass))

typedef struct GiggleGitConfig      GiggleGitConfig;
typedef struct GiggleGitConfigClass GiggleGitConfigClass;

typedef void (*GiggleGitConfigFunc) (GiggleGitConfig *config,
				     gboolean         sucess,
				     gpointer         user_data);

struct GiggleGitConfig {
	GObject   parent_instance;
};

struct GiggleGitConfigClass {
	GObjectClass parent_class;

	void (*changed) (GiggleGitConfig *config);
};

typedef enum {
	GIGGLE_GIT_CONFIG_FIELD_NAME,
	GIGGLE_GIT_CONFIG_FIELD_EMAIL,
	GIGGLE_GIT_CONFIG_FIELD_MAIN_WINDOW_MAXIMIZED,
	GIGGLE_GIT_CONFIG_FIELD_MAIN_WINDOW_GEOMETRY,
	GIGGLE_GIT_CONFIG_FIELD_MAIN_WINDOW_VIEW,
	GIGGLE_GIT_CONFIG_FIELD_SHOW_GRAPH,
	GIGGLE_GIT_CONFIG_FIELD_FILE_VIEW_PATH,
	GIGGLE_GIT_CONFIG_FIELD_FILE_VIEW_HPANE_POSITION,
	GIGGLE_GIT_CONFIG_FIELD_FILE_VIEW_VPANE_POSITION,
	GIGGLE_GIT_CONFIG_FIELD_HISTORY_VIEW_VPANE_POSITION,
} GiggleGitConfigField;

GType                   giggle_git_config_get_type          (void);
GiggleGitConfig *       giggle_git_config_new               (void);

void                    giggle_git_config_update            (GiggleGitConfig      *config,
							     GiggleGitConfigFunc   func,
							     gpointer              data);
void                    giggle_git_config_commit            (GiggleGitConfig      *config,
							     GiggleGitConfigFunc   func,
							     gpointer              data);

const gchar *           giggle_git_config_get_field         (GiggleGitConfig      *config,
							     GiggleGitConfigField  field);
int                     giggle_git_config_get_int_field     (GiggleGitConfig      *config,
							     GiggleGitConfigField  field);
gboolean                giggle_git_config_get_boolean_field (GiggleGitConfig      *config,
							     GiggleGitConfigField  field);
void                    giggle_git_config_set_field         (GiggleGitConfig      *config,
							     GiggleGitConfigField  field,
							     const gchar          *value);
void                    giggle_git_config_set_int_field     (GiggleGitConfig      *config,
							     GiggleGitConfigField  field,
							     int                   value);
void                    giggle_git_config_set_boolean_field (GiggleGitConfig      *config,
							     GiggleGitConfigField  field,
							     gboolean              value);

void                    giggle_git_config_bind              (GiggleGitConfig      *config,
							     GiggleGitConfigField  field,
							     GObject              *object,
							     const char           *property);

G_END_DECLS

#endif /* __GIGGLE_GIT_CONFIG_H__ */