summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-preferences.h
diff options
context:
space:
mode:
authorRamiro Estrugo <ramiro@src.gnome.org>2000-04-18 14:05:36 +0000
committerRamiro Estrugo <ramiro@src.gnome.org>2000-04-18 14:05:36 +0000
commit216a3f892c99953075b2cc71dd2c953a2e2d8aa4 (patch)
tree9069f220f02c421079bb01be0bc5d915ce05dd05 /libnautilus-private/nautilus-preferences.h
parent0f7f115f9479136334e075043433190aecd1045a (diff)
downloadnautilus-216a3f892c99953075b2cc71dd2c953a2e2d8aa4.tar.gz
Many prefernece api changes. Make pref api behave more like the metadata
api. Dont expose user levels publically. Tweak preference dialog widgets to make them easier to use.
Diffstat (limited to 'libnautilus-private/nautilus-preferences.h')
-rw-r--r--libnautilus-private/nautilus-preferences.h128
1 files changed, 54 insertions, 74 deletions
diff --git a/libnautilus-private/nautilus-preferences.h b/libnautilus-private/nautilus-preferences.h
index 88e36e74f..b82f9a371 100644
--- a/libnautilus-private/nautilus-preferences.h
+++ b/libnautilus-private/nautilus-preferences.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* nautilus-prefs.h - Preference peek/poke/notify object interface.
+/* nautilus-preferences.h - Preference peek/poke/notify object interface.
Copyright (C) 1999, 2000 Eazel, Inc.
@@ -28,6 +28,8 @@
#include <gtk/gtkobject.h>
#include <libgnome/gnome-defs.h>
+#include <nautilus-widgets/nautilus-preference.h>
+
BEGIN_GNOME_DECLS
#define NAUTILUS_TYPE_PREFERENCES (nautilus_preferences_get_type ())
@@ -47,90 +49,68 @@ struct NautilusPreferences
};
/*
- * NautilusPreferencesType:
- *
- * The types of supported preferences.
- */
-typedef enum
-{
- NAUTILUS_PREFERENCE_BOOLEAN,
- NAUTILUS_PREFERENCE_ENUM,
- NAUTILUS_PREFERENCE_STRING
-} NautilusPreferencesType;
-
-/*
* A callback which you can register to to be notified when a particular
* preference changes.
*/
typedef void (*NautilusPreferencesCallback) (NautilusPreferences *preferences,
const char *name,
- gconstpointer value,
- gpointer user_data);
+ gpointer callback_data);
struct NautilusPreferencesClass
{
GtkObjectClass object_class;
};
-typedef struct
-{
- char *name;
- char *description;
- NautilusPreferencesType type;
- gconstpointer default_value;
- gpointer data;
-} NautilusPreferencesInfo;
-
-typedef struct
-{
- const char * const *enum_names;
- const char * const *enum_descriptions;
- const int *enum_values;
- guint num_entries;
-} NautilusPreferencesEnumData;
-
-GtkType nautilus_preferences_get_type (void);
-GtkObject * nautilus_preferences_new (const char *domain);
-const NautilusPreferencesInfo *nautilus_preferences_get_info (NautilusPreferences *preferences,
- const char *name);
-void nautilus_preferences_set_info (NautilusPreferences *preferences,
- const char *name,
- const char *description,
- NautilusPreferencesType type,
- gconstpointer default_value,
- gpointer data);
-gboolean nautilus_preferences_add_enum_callback (NautilusPreferences *preferences,
- const char *name,
- NautilusPreferencesCallback callback,
- gpointer user_data);
-gboolean nautilus_preferences_add_boolean_callback (NautilusPreferences *preferences,
- const char *name,
- NautilusPreferencesCallback callback,
- gpointer user_data);
-gboolean nautilus_preferences_add_string_callback (NautilusPreferences *preferences,
- const char *name,
- NautilusPreferencesCallback callback,
- gpointer user_data);
-gboolean nautilus_preferences_remove_callback (NautilusPreferences *preferences,
- const char *name,
- NautilusPreferencesCallback callback,
- gpointer user_data);
-void nautilus_preferences_set_boolean (NautilusPreferences *preferences,
- const char *name,
- gboolean value);
-gboolean nautilus_preferences_get_boolean (NautilusPreferences *preferences,
- const char *name);
-void nautilus_preferences_set_enum (NautilusPreferences *preferences,
- const char *name,
- int value);
-int nautilus_preferences_get_enum (NautilusPreferences *preferences,
- const char *name);
-void nautilus_preferences_set_string (NautilusPreferences *preferences,
- const char *name,
- const char *value);
-char * nautilus_preferences_get_string (NautilusPreferences *preferences,
- const char *name);
-NautilusPreferences * nautilus_preferences_get_global_preferences (void);
+GtkType nautilus_preferences_get_type (void);
+GtkObject * nautilus_preferences_new (const char *domain);
+NautilusPreference * nautilus_preferences_get_preference (const NautilusPreferences *preferences,
+ const char *name);
+void nautilus_preferences_set_info (NautilusPreferences *preferences,
+ const char *name,
+ const char *description,
+ NautilusPreferenceType type,
+ gconstpointer default_value);
+void nautilus_preferences_enum_add_entry (NautilusPreferences *preferences,
+ const char *name,
+ const char *entry_name,
+ const char *entry_description,
+ int entry_value);
+gboolean nautilus_preferences_add_enum_callback (NautilusPreferences *preferences,
+ const char *name,
+ NautilusPreferencesCallback callback,
+ gpointer callback_data);
+gboolean nautilus_preferences_add_boolean_callback (NautilusPreferences *preferences,
+ const char *name,
+ NautilusPreferencesCallback callback,
+ gpointer callback_data);
+gboolean nautilus_preferences_add_string_callback (NautilusPreferences *preferences,
+ const char *name,
+ NautilusPreferencesCallback callback,
+ gpointer callback_data);
+gboolean nautilus_preferences_remove_callback (NautilusPreferences *preferences,
+ const char *name,
+ NautilusPreferencesCallback callback,
+ gpointer callback_data);
+void nautilus_preferences_set_boolean (NautilusPreferences *preferences,
+ const char *name,
+ gboolean value);
+gboolean nautilus_preferences_get_boolean (const NautilusPreferences *preferences,
+ const char *name,
+ gboolean default_value);
+void nautilus_preferences_set_enum (NautilusPreferences *preferences,
+ const char *name,
+ int value);
+int nautilus_preferences_get_enum (const NautilusPreferences *preferences,
+ const char *name,
+ int default_value);
+void nautilus_preferences_set (NautilusPreferences *preferences,
+ const char *name,
+ const char *value);
+char * nautilus_preferences_get (const NautilusPreferences *preferences,
+ const char *name,
+ const gchar *default_value);
+NautilusPreferences *nautilus_preferences_get_global_preferences (void);
+
BEGIN_GNOME_DECLS