Move into a seperate library so the settings daemon can avail of this
2002-05-14 Seth Nickell <snickell@stanford.edu> * Makefile.am: * gnome-window-manager.c: * gnome-window-manager.h: Move into a seperate library so the settings daemon can avail of this code.
This commit is contained in:
parent
9ad97b920e
commit
10f94aee4c
4 changed files with 13 additions and 93 deletions
|
@ -1,3 +1,12 @@
|
|||
2002-05-14 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* Makefile.am:
|
||||
* gnome-window-manager.c:
|
||||
* gnome-window-manager.h:
|
||||
|
||||
Move into a seperate library so the settings daemon
|
||||
can avail of this code.
|
||||
|
||||
2002-05-11 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* .cvsignore:
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
bin_PROGRAMS = gnome-window-properties
|
||||
|
||||
gnome_window_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
|
||||
gnome_window_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS) \
|
||||
$(top_builddir)/libwindow-settings/libwindow-settings.la
|
||||
|
||||
gnome_window_properties_SOURCES = \
|
||||
gnome-window-manager.h \
|
||||
gnome-window-manager.c \
|
||||
gnome-window-properties.c \
|
||||
wm-properties.h \
|
||||
wm-exec.c \
|
||||
|
@ -44,6 +44,7 @@ Desktop_in_files = window-properties.desktop.in
|
|||
desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
|
||||
|
||||
INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(DESKTOP_ITEM_CFLAGS) \
|
||||
-I $(top_builddir)/libwindow-settings \
|
||||
-DGNOME_WINDOW_MANAGER_MODULE_PATH=\""$(libdir)/window-manager-settings"\"
|
||||
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
|
||||
EXTRA_DIST = $(Glade_DATA) $(icons_DATA) $(Desktop_in_files) $(pixmap_DATA)
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
#include "gnome-window-manager.h"
|
||||
|
||||
#include <gmodule.h>
|
||||
|
||||
GObject *
|
||||
gnome_window_manager_new (GnomeDesktopItem *item)
|
||||
{
|
||||
const char *settings_lib;
|
||||
char *module_name;
|
||||
GnomeWindowManagerNewFunc wm_new_func = NULL;
|
||||
GObject *wm;
|
||||
GModule *module;
|
||||
gboolean success;
|
||||
|
||||
settings_lib = gnome_desktop_item_get_string (item, "GnomeSettingsLibrary");
|
||||
|
||||
module_name = g_module_build_path (GNOME_WINDOW_MANAGER_MODULE_PATH,
|
||||
settings_lib);
|
||||
|
||||
module = g_module_open (module_name, G_MODULE_BIND_LAZY);
|
||||
if (module == NULL) {
|
||||
g_warning ("Couldn't load window manager settings module `%s' (%s)", module_name, g_module_error ());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
success = g_module_symbol (module, "window_manager_new",
|
||||
(gpointer *) &wm_new_func);
|
||||
|
||||
if ((!success) || wm_new_func == NULL) {
|
||||
g_warning ("Couldn't load window manager settings module `%s`, couldn't find symbol \'window_manager_new\'", module_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wm = (wm_new_func) ();
|
||||
|
||||
return (wm);
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
#ifndef GNOME_WINDOW_MANAGER_H
|
||||
#define GNOME_WINDOW_MANAGER_H
|
||||
|
||||
#include <glib/gerror.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <libgnome/gnome-desktop-item.h>
|
||||
|
||||
typedef GObject * (* GnomeWindowManagerNewFunc) (void);
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GNOME_WINDOW_MANAGER_TYPE (gnome_window_manager_get_type ())
|
||||
#define GNOME_WINDOW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_WINDOW_MANAGER_TYPE, GnomeWindowManager))
|
||||
#define GNOME_WINDOW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_WINDOW_MANAGER_TYPE, GnomeWindowManagerClass))
|
||||
#define IS_GNOME_WINDOW_MANAGER(obj) (GTK_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_WINDOW_MANAGER_TYPE))
|
||||
#define IS_GNOME_WINDOW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_WINDOW_MANAGER_TYPE))
|
||||
#define GNOME_WINDOW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_WINDOW_MANAGER_TYPE, GnomeWindowManagerClass))
|
||||
|
||||
#define GNOME_WINDOW_MANAGER_ERROR gnome_window_manager_error_quark ()
|
||||
|
||||
typedef struct _GnomeWindowManager GnomeWindowManager;
|
||||
typedef struct _GnomeWindowManagerClass GnomeWindowManagerClass;
|
||||
typedef struct _GnomeWindowManagerPrivate GnomeWindowManagerPrivate;
|
||||
|
||||
struct _GnomeWindowManager
|
||||
{
|
||||
GObject parent_instance;
|
||||
};
|
||||
|
||||
struct _GnomeWindowManagerClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
void (*set_theme) (const char *theme_name);
|
||||
GList * (*get_theme_list) (void);
|
||||
void (*set_font) (const char *font);
|
||||
gboolean (*get_focus_follows_mouse) (void);
|
||||
void (*set_focus_follows_mouse) (gboolean focus_follows_mouse);
|
||||
};
|
||||
|
||||
GObject *gnome_window_manager_new (GnomeDesktopItem *item);
|
||||
|
||||
GType gnome_window_manager_get_type (void);
|
||||
void gnome_window_manager_set_theme (const char *theme_name);
|
||||
GList * gnome_window_manager_get_theme_list (void);
|
||||
void gnome_window_manager_set_font (const char *font);
|
||||
gboolean gnome_window_manager_get_focus_follows_mouse (void);
|
||||
void gnome_window_manager_set_focus_follows_mouse (gboolean focus_follows_mouse);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GNOME_WINDOW_MANAGER_H */
|
Loading…
Add table
Reference in a new issue