~notify-osd-developers/gnome-settings-daemon/notifications

« back to all changes in this revision

Viewing changes to plugins/background/libbackground/preferences.h

  • Committer: Bazaar Package Importer
  • Date: 2008-10-04 12:35:52 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: jamesw@ubuntu.com-20081004123552-whu0p0p3s8hjk0d5
Tags: upstream-ubuntu-2.23.3
ImportĀ upstreamĀ versionĀ 2.23.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c; style: linux -*- */
2
 
 
3
 
/* preferences.h
4
 
 * Copyright (C) 2000 Helix Code, Inc.
5
 
 *
6
 
 * Written by Bradford Hovinen <hovinen@helixcode.com>
7
 
 *
8
 
 * This program is free software; you can redistribute it and/or modify
9
 
 * it under the terms of the GNU General Public License as published by
10
 
 * the Free Software Foundation; either version 2, or (at your option)
11
 
 * any later version.
12
 
 *
13
 
 * This program is distributed in the hope that it will be useful,
14
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 
 * GNU General Public License for more details.
17
 
 *
18
 
 * You should have received a copy of the GNU General Public License
19
 
 * along with this program; if not, write to the Free Software
20
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21
 
 * 02111-1307, USA.
22
 
 */
23
 
 
24
 
#ifndef __BGPREFERENCES_H
25
 
#define __BGPREFERENCES_H
26
 
 
27
 
#include <glib-object.h>
28
 
#include <gdk-pixbuf/gdk-pixbuf.h>
29
 
#include <gconf/gconf-client.h>
30
 
 
31
 
#define BG_PREFERENCES(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, bg_preferences_get_type (), BGPreferences)
32
 
#define BG_PREFERENCES_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, bg_preferences_get_type (), BGPreferencesClass)
33
 
#define IS_BG_PREFERENCES(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, bg_preferences_get_type ())
34
 
 
35
 
#define BG_PREFERENCES_DRAW_BACKGROUND    "/desktop/gnome/background/draw_background"
36
 
#define BG_PREFERENCES_PRIMARY_COLOR      "/desktop/gnome/background/primary_color"
37
 
#define BG_PREFERENCES_SECONDARY_COLOR    "/desktop/gnome/background/secondary_color"
38
 
#define BG_PREFERENCES_COLOR_SHADING_TYPE "/desktop/gnome/background/color_shading_type"
39
 
#define BG_PREFERENCES_PICTURE_OPTIONS    "/desktop/gnome/background/picture_options"
40
 
#define BG_PREFERENCES_PICTURE_OPACITY    "/desktop/gnome/background/picture_opacity"
41
 
#define BG_PREFERENCES_PICTURE_FILENAME   "/desktop/gnome/background/picture_filename"
42
 
 
43
 
 
44
 
typedef struct _BGPreferences BGPreferences;
45
 
typedef struct _BGPreferencesClass BGPreferencesClass;
46
 
 
47
 
typedef enum _orientation_t {
48
 
        ORIENTATION_SOLID = 0, 
49
 
        ORIENTATION_HORIZ, 
50
 
        ORIENTATION_VERT
51
 
} orientation_t;
52
 
 
53
 
typedef enum _wallpaper_type_t {
54
 
        WPTYPE_TILED = 0, WPTYPE_CENTERED, WPTYPE_SCALED,
55
 
        WPTYPE_STRETCHED, WPTYPE_ZOOM, WPTYPE_NONE,
56
 
        WPTYPE_UNSET
57
 
} wallpaper_type_t;
58
 
 
59
 
struct _BGPreferences
60
 
{
61
 
        GObject           object;
62
 
 
63
 
        gint              frozen;
64
 
        gboolean          auto_apply;
65
 
        guint             timeout_id;
66
 
 
67
 
        gboolean          enabled;
68
 
        gboolean          gradient_enabled;
69
 
        gboolean          wallpaper_enabled;
70
 
        orientation_t     orientation;
71
 
        wallpaper_type_t  wallpaper_type;
72
 
 
73
 
        GdkColor         *color1;
74
 
        GdkColor         *color2;
75
 
 
76
 
        gchar            *wallpaper_filename;
77
 
        gchar            *wallpaper_sel_path;
78
 
 
79
 
        GSList           *wallpapers;
80
 
 
81
 
        gboolean          adjust_opacity;
82
 
        gint              opacity;
83
 
};
84
 
 
85
 
struct _BGPreferencesClass
86
 
{
87
 
        GObjectClass klass;
88
 
};
89
 
 
90
 
GType    bg_preferences_get_type    (void);
91
 
 
92
 
GObject *bg_preferences_new         (void);
93
 
GObject *bg_preferences_clone       (const BGPreferences   *prefs);
94
 
 
95
 
void     bg_preferences_load        (BGPreferences         *prefs);
96
 
 
97
 
void     bg_preferences_merge_entry (BGPreferences         *prefs,
98
 
                                     const GConfEntry      *entry);
99
 
 
100
 
void     bg_preferences_save        (BGPreferences *prefs);
101
 
 
102
 
const gchar *bg_preferences_get_wptype_as_string      (wallpaper_type_t wp);
103
 
const gchar *bg_preferences_get_orientation_as_string (orientation_t    o);
104
 
GType        bg_preferences_wptype_get_type           (void);
105
 
GType        bg_preferences_orientation_get_type      (void);
106
 
 
107
 
        
108
 
#endif /* __PREFERENCES_H */