/gpump/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/gpump/trunk

« back to all changes in this revision

Viewing changes to src/GPumpSettings.h

  • Committer: Gustav Hatvigsson
  • Date: 2014-04-14 07:33:32 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140414073332-eagun3d8y56k3dtd
* Switched to GKeyFile instead of GSettings, for the time being.

** This is untested code **

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil
 
2
 * vi: set shiftwidth=2 tabstop=2 expandtab:
 
3
 * :indentSize=2:tabSize=2:noTabs=true:
 
4
 */
 
5
 
 
6
#ifndef __H_GPUMP_SETTINGS__
 
7
#define __H_GPUMP_SETTINGS__
 
8
 
 
9
#include <gtk/gtk.h>
 
10
#include <gio/gio.h>
 
11
#include <rest/oauth2-proxy.h>
 
12
#include <rest/rest-proxy-call.h>
 
13
#include <stdlib.h>
 
14
#include <string.h>
 
15
#include <glib/gi18n.h>
 
16
 
 
17
 
 
18
#define GPUMP_TYPE_SETTINGS              (gpump_settings_get_type ())
 
19
#define GPUMP_SETTINGS(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), GPUMP_TYPE_SETTINGS, GPumpSettings))
 
20
#define GPUMP_SETTINGS_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GPUMP_TYPE_SETTINGS, GPumpSettingsClass))
 
21
#define GPUMP_IS_SETTINGS(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPUMP_TYPE_SETTINGS))
 
22
#define GPUMP_IS_SETTINGS_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GPUMP_TYPE_SETTINGS))
 
23
#define GPUMP_SETTINGS_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GPUMP_TYPE_SETTINGS, GPumpSettingsClass))
 
24
 
 
25
typedef struct GPumpSettings GPumpSettings;
 
26
typedef struct GPumpSettingsClass GPumpSettingsClass;
 
27
typedef struct GPumpSettingsPrivate GPumpSettingsPrivate;
 
28
 
 
29
/*
 
30
 * NAMESPACE: gpump_*
 
31
 *
 
32
 * GPumpSettings
 
33
 *
 
34
 * GPumpSettings the widget tha displays the UI for the sittings dialoug.
 
35
 *
 
36
 * CLASS NAMESPACE: gpmup_settings_*
 
37
 */
 
38
 
 
39
 
 
40
/**
 
41
 * GPumpSettings is a widget that is used for changing the settings of GPump.
 
42
 * 
 
43
 * The data is stored in the singeltonian class GPumpSettingsData.
 
44
 */
 
45
struct GPumpSettings {
 
46
  GtkDialog parent;
 
47
  
 
48
  /* 
 
49
   * Priavte structure defined in the .c file.
 
50
   */
 
51
  GPumpSettingsPrivate * priv;
 
52
};
 
53
 
 
54
struct GPumpSettingsClass {
 
55
  GtkDialogClass parent;
 
56
};
 
57
 
 
58
/**
 
59
 * Create a settings widget and class that contains the settings of the
 
60
 * application. Do not free this untill the app is closing!
 
61
 * 
 
62
 * @param parent The parent widget, the widget that this widget is suppose to
 
63
 * be attatched to.
 
64
 */
 
65
GPumpSettings * gpump_settings_new (GtkWidget * parent);
 
66
 
 
67
/**
 
68
 * Shows the widget and attatches it to the parent window defined when the
 
69
 * object was created with gpump_setting_new.
 
70
 */
 
71
void gpump_settings_show (GPumpSettings * self);
 
72
 
 
73
/**
 
74
 * Hides the widget, this is only useful from the widget itself.
 
75
 * 
 
76
 */
 
77
void gpump_settings_hide (GPumpSettings * self);
 
78
 
 
79
 
 
80
#endif /* __H_GPUMP_SETTINGS__ */