Commit 128530db authored by William Jon McCann's avatar William Jon McCann Committed by William Jon McCann

Added cut-n-paste lib.

2007-09-12  William Jon McCann  <mccann@jhu.edu>

	* gui/simple-greeter/Makefile.am:
	* gui/simple-greeter/libbackground:
	Added cut-n-paste lib.


svn path=/branches/mccann-gobject/; revision=5251
parent 4e7b2b84
2007-09-12 William Jon McCann <mccann@jhu.edu>
* gui/simple-greeter/Makefile.am:
* gui/simple-greeter/libbackground:
Added cut-n-paste lib.
2007-09-12 William Jon McCann <mccann@jhu.edu>
* gui/simple-greeter/Makefile.am:
......
......@@ -2,12 +2,14 @@ NULL =
SUBDIRS = \
libnotificationarea \
libbackground \
$(NULL)
INCLUDES = \
-I$(top_srcdir)/common \
-I$(top_srcdir)/libgreeter \
-I$(top_srcdir)/gui/simple-greeter/libnotificationarea \
-I$(top_srcdir)/gui/simple-greeter/libbackground \
-DAUTHDIR=\""$(authdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DGDMCONFDIR=\"$(gdmconfdir)\" \
......@@ -57,6 +59,7 @@ gdm_simple_greeter_LDADD = \
-L$(top_builddir)/libgreeter \
-lgreeter \
$(top_builddir)/gui/simple-greeter/libnotificationarea/libnotificationarea.la \
$(top_builddir)/gui/simple-greeter/libbackground/libbackground.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(GOBJECT_LIBS) \
......
This diff is collapsed.
EXTRA_DIST = ChangeLog
INCLUDES = \
-DG_LOG_DOMAIN=\"capplet-common\" \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
-I$(top_srcdir)/ \
@CAPPLET_CFLAGS@
noinst_LTLIBRARIES = libbackground.la
libbackground_la_SOURCES = \
applier.c applier.h \
preferences.c preferences.h
This diff is collapsed.
/* -*- mode: c; style: linux -*- */
/* applier.h
* Copyright (C) 2000 Helix Code, Inc.
*
* Written by Bradford Hovinen <hovinen@helixcode.com>
*
* 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, 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef __APPLIER_H
#define __APPLIER_H
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <X11/Xlib.h>
#include "preferences.h"
#define BG_APPLIER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, bg_applier_get_type (), BGApplier)
#define BG_APPLIER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, bg_applier_get_type (), BGApplierClass)
#define IS_BG_APPLIER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, bg_applier_get_type ())
typedef struct _BGApplier BGApplier;
typedef struct _BGApplierClass BGApplierClass;
typedef struct _BGApplierPrivate BGApplierPrivate;
typedef enum _BGApplierType {
BG_APPLIER_ROOT, BG_APPLIER_PREVIEW
} BGApplierType;
struct _BGApplier
{
GObject object;
BGApplierPrivate *p;
};
struct _BGApplierClass
{
GObjectClass klass;
};
GType bg_applier_get_type (void);
GObject *bg_applier_new (BGApplierType type);
GObject *bg_applier_new_at_size (BGApplierType type,
const guint width,
const guint height);
GObject *bg_applier_new_for_screen (BGApplierType type,
GdkScreen *screen);
void bg_applier_apply_prefs (BGApplier *bg_applier,
const BGPreferences *prefs);
gboolean bg_applier_render_color_p (const BGApplier *bg_applier,
const BGPreferences *prefs);
GtkWidget *bg_applier_get_preview_widget (BGApplier *bg_applier);
GdkPixbuf *bg_applier_get_wallpaper_pixbuf (BGApplier *bg_applier);
#endif /* __APPLIER_H */
This diff is collapsed.
/* -*- mode: c; style: linux -*- */
/* preferences.h
* Copyright (C) 2000 Helix Code, Inc.
*
* Written by Bradford Hovinen <hovinen@helixcode.com>
*
* 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, 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef __BGPREFERENCES_H
#define __BGPREFERENCES_H
#include <glib-object.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gconf/gconf-client.h>
#define BG_PREFERENCES(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, bg_preferences_get_type (), BGPreferences)
#define BG_PREFERENCES_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, bg_preferences_get_type (), BGPreferencesClass)
#define IS_BG_PREFERENCES(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, bg_preferences_get_type ())
#define BG_PREFERENCES_DRAW_BACKGROUND "/desktop/gnome/background/draw_background"
#define BG_PREFERENCES_PRIMARY_COLOR "/desktop/gnome/background/primary_color"
#define BG_PREFERENCES_SECONDARY_COLOR "/desktop/gnome/background/secondary_color"
#define BG_PREFERENCES_COLOR_SHADING_TYPE "/desktop/gnome/background/color_shading_type"
#define BG_PREFERENCES_PICTURE_OPTIONS "/desktop/gnome/background/picture_options"
#define BG_PREFERENCES_PICTURE_OPACITY "/desktop/gnome/background/picture_opacity"
#define BG_PREFERENCES_PICTURE_FILENAME "/desktop/gnome/background/picture_filename"
typedef struct _BGPreferences BGPreferences;
typedef struct _BGPreferencesClass BGPreferencesClass;
typedef enum _orientation_t {
ORIENTATION_SOLID = 0,
ORIENTATION_HORIZ,
ORIENTATION_VERT
} orientation_t;
typedef enum _wallpaper_type_t {
WPTYPE_TILED = 0, WPTYPE_CENTERED, WPTYPE_SCALED,
WPTYPE_STRETCHED, WPTYPE_ZOOM, WPTYPE_NONE,
WPTYPE_UNSET
} wallpaper_type_t;
struct _BGPreferences
{
GObject object;
gint frozen;
gboolean auto_apply;
guint timeout_id;
gboolean enabled;
gboolean gradient_enabled;
gboolean wallpaper_enabled;
orientation_t orientation;
wallpaper_type_t wallpaper_type;
GdkColor *color1;
GdkColor *color2;
gchar *wallpaper_filename;
gchar *wallpaper_sel_path;
GSList *wallpapers;
gboolean adjust_opacity;
gint opacity;
};
struct _BGPreferencesClass
{
GObjectClass klass;
};
GType bg_preferences_get_type (void);
GObject *bg_preferences_new (void);
GObject *bg_preferences_clone (const BGPreferences *prefs);
void bg_preferences_load (BGPreferences *prefs);
void bg_preferences_merge_entry (BGPreferences *prefs,
const GConfEntry *entry);
void bg_preferences_save (BGPreferences *prefs);
const gchar *bg_preferences_get_wptype_as_string (wallpaper_type_t wp);
const gchar *bg_preferences_get_orientation_as_string (orientation_t o);
GType bg_preferences_wptype_get_type (void);
GType bg_preferences_orientation_get_type (void);
#endif /* __PREFERENCES_H */
#include "na-marshal.h"
#include <glib-object.h>
#ifdef G_ENABLE_DEBUG
#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
#define g_marshal_value_peek_char(v) g_value_get_char (v)
#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
#define g_marshal_value_peek_int(v) g_value_get_int (v)
#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
#define g_marshal_value_peek_long(v) g_value_get_long (v)
#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
#define g_marshal_value_peek_float(v) g_value_get_float (v)
#define g_marshal_value_peek_double(v) g_value_get_double (v)
#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
#define g_marshal_value_peek_param(v) g_value_get_param (v)
#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
#define g_marshal_value_peek_object(v) g_value_get_object (v)
#else /* !G_ENABLE_DEBUG */
/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
* Do not access GValues directly in your code. Instead, use the
* g_value_get_*() functions
*/
#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
#define g_marshal_value_peek_char(v) (v)->data[0].v_int
#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
#define g_marshal_value_peek_int(v) (v)->data[0].v_int
#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
#define g_marshal_value_peek_long(v) (v)->data[0].v_long
#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
#define g_marshal_value_peek_enum(v) (v)->data[0].v_long
#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
#define g_marshal_value_peek_float(v) (v)->data[0].v_float
#define g_marshal_value_peek_double(v) (v)->data[0].v_double
#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
#endif /* !G_ENABLE_DEBUG */
/* VOID:OBJECT,OBJECT (na-marshal.list:1) */
void
_na_marshal_VOID__OBJECT_OBJECT (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1,
gpointer arg_1,
gpointer arg_2,
gpointer data2);
register GMarshalFunc_VOID__OBJECT_OBJECT callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
g_return_if_fail (n_param_values == 3);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
callback (data1,
g_marshal_value_peek_object (param_values + 1),
g_marshal_value_peek_object (param_values + 2),
data2);
}
/* VOID:OBJECT,STRING,LONG,LONG (na-marshal.list:2) */
void
_na_marshal_VOID__OBJECT_STRING_LONG_LONG (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__OBJECT_STRING_LONG_LONG) (gpointer data1,
gpointer arg_1,
gpointer arg_2,
glong arg_3,
glong arg_4,
gpointer data2);
register GMarshalFunc_VOID__OBJECT_STRING_LONG_LONG callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
g_return_if_fail (n_param_values == 5);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_VOID__OBJECT_STRING_LONG_LONG) (marshal_data ? marshal_data : cc->callback);
callback (data1,
g_marshal_value_peek_object (param_values + 1),
g_marshal_value_peek_string (param_values + 2),
g_marshal_value_peek_long (param_values + 3),
g_marshal_value_peek_long (param_values + 4),
data2);
}
/* VOID:OBJECT,LONG (na-marshal.list:3) */
void
_na_marshal_VOID__OBJECT_LONG (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data)
{
typedef void (*GMarshalFunc_VOID__OBJECT_LONG) (gpointer data1,
gpointer arg_1,
glong arg_2,
gpointer data2);
register GMarshalFunc_VOID__OBJECT_LONG callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
g_return_if_fail (n_param_values == 3);
if (G_CCLOSURE_SWAP_DATA (closure))
{
data1 = closure->data;
data2 = g_value_peek_pointer (param_values + 0);
}
else
{
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
callback = (GMarshalFunc_VOID__OBJECT_LONG) (marshal_data ? marshal_data : cc->callback);
callback (data1,
g_marshal_value_peek_object (param_values + 1),
g_marshal_value_peek_long (param_values + 2),
data2);
}
#ifndef ___na_marshal_MARSHAL_H__
#define ___na_marshal_MARSHAL_H__
#include <glib-object.h>
G_BEGIN_DECLS
/* VOID:OBJECT,OBJECT (na-marshal.list:1) */
extern void _na_marshal_VOID__OBJECT_OBJECT (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
/* VOID:OBJECT,STRING,LONG,LONG (na-marshal.list:2) */
extern void _na_marshal_VOID__OBJECT_STRING_LONG_LONG (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
/* VOID:OBJECT,LONG (na-marshal.list:3) */
extern void _na_marshal_VOID__OBJECT_LONG (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data);
G_END_DECLS
#endif /* ___na_marshal_MARSHAL_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment