/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 Hartvigsson
  • Date: 2014-02-12 23:06:37 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140212230637-koam1oehdtu5pbps
* Started work on the settings dioloug.
* Fixed a few things in the man app:
  * Menu
  * window size dose no longer have a minimum size.
* other changes.

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
#include <gtk/gtk.h>
 
7
#include <gio/gio.h>
 
8
#include <rest/oauth2-proxy.h>
 
9
#include <rest/rest-proxy-call.h>
 
10
#include <stdlib.h>
 
11
#include <string.h>
 
12
#include <glib/gi18n.h>
 
13
 
 
14
 
 
15
#define GPUMP_TYPE_SETTINGS              (gpump_settings_get_type ())
 
16
#define GPUMP_SETTINGS(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), GPUMP_TYPE_SETTINGS, GPumpSettings))
 
17
#define GPUMP_SETTINGS_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GPUMP_TYPE_SETTINGS, GPumpSettingsClass))
 
18
#define GPUMP_IS_SETTINGS(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPUMP_TYPE_SETTINGS))
 
19
#define GPUMP_IS_SETTINGS_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GPUMP_TYPE_SETTINGS))
 
20
#define GPUMP_SETTINGS_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GPUMP_TYPE_SETTINGS, GPumpSettingsClass))
 
21
 
 
22
typedef struct GPumpSettings GPumpSettings;
 
23
typedef struct GPumpSettingsClass GPumpSettingsClass;
 
24
typedef struct GPumpSettingsPrivate GPumpSettingsPrivate;
 
25
 
 
26
/*
 
27
 * GPumpSettings
 
28
 *
 
29
 * GPumpSettings the widget tha displays the UI for the sittings dialoug.
 
30
 */
 
31
 
 
32
struct GPumpSettings {
 
33
  GtkDialog parent;
 
34
  
 
35
  GSettings * ui_settings; /* Do not  */
 
36
  GSettings * gpump_settings;
 
37
  
 
38
  /* 
 
39
   * Priavte structure defined in the .c file.
 
40
   */
 
41
  GPumpSettingsPrivate * priv;
 
42
};
 
43
 
 
44
struct GPumpSettingsClass {
 
45
  GtkDialogClass parent;
 
46
};
 
47
 
 
48
/**
 
49
 * Create a settings widget and class that contains the settings of the
 
50
 * application. Do not free this untill the app is closing!
 
51
 * 
 
52
 * @param parent The parent widget, the widget that this widget is suppose to
 
53
 * be attatched to.
 
54
 */
 
55
GPumpSettings * gpump_settings_new (GtkWidget * parent);
 
56
 
 
57
 
 
58
/**
 
59
 * Frees the self object in an un-safe facion.
 
60
 * you have been warned!
 
61
 */
 
62
void gpump_settings_free (GPumpSettings * self);
 
63
 
 
64
/**
 
65
 * Shows the widget and attatches it to the parent window defined when the
 
66
 * object was created with gpump_setting_new.
 
67
 */
 
68
void gpump_settings_show (GPumpSettings * self);
 
69
 
 
70
/**
 
71
 * Hides the widget, this is only useful from the widget itself.
 
72
 * 
 
73
 */
 
74
void gpump_settings_hide (GPumpSettings * self);
 
75