summaryrefslogtreecommitdiff
path: root/libwindow-settings
diff options
context:
space:
mode:
Diffstat (limited to 'libwindow-settings')
-rw-r--r--libwindow-settings/Makefile.am55
-rw-r--r--libwindow-settings/Makefile.in792
-rw-r--r--libwindow-settings/marco-window-manager.c520
-rw-r--r--libwindow-settings/marco-window-manager.h29
-rw-r--r--libwindow-settings/mate-window-manager.c273
-rw-r--r--libwindow-settings/mate-window-manager.h168
-rw-r--r--libwindow-settings/mate-window-settings-2.0.pc.in11
-rw-r--r--libwindow-settings/mate-wm-manager.c320
-rw-r--r--libwindow-settings/mate-wm-manager.h16
9 files changed, 2184 insertions, 0 deletions
diff --git a/libwindow-settings/Makefile.am b/libwindow-settings/Makefile.am
new file mode 100644
index 00000000..c111cc22
--- /dev/null
+++ b/libwindow-settings/Makefile.am
@@ -0,0 +1,55 @@
+WM_MODULE_DIR=$(libdir)/window-manager-settings
+
+INCLUDES = \
+ -DMATELOCALEDIR="\"$(datadir)/locale\"" \
+ -DMATE_ICONDIR=\""$(datadir)/pixmaps"\" \
+ -DG_LOG_DOMAIN=\"capplet-common\" \
+ -DMATE_WM_PROPERTY_PATH=\"$(datadir)/mate/wm-properties\" \
+ -DMATE_WINDOW_MANAGER_MODULE_PATH=\""$(WM_MODULE_DIR)"\" \
+ -I$(top_srcdir)/ \
+ @CAPPLET_CFLAGS@ \
+ -DMARCO_THEME_DIR=\""$(datadir)/themes"\"
+
+lib_LTLIBRARIES = libmate-window-settings.la
+
+libmate_window_settings_la_LDFLAGS = \
+ -export_dynamic \
+ -no-undefined \
+ -version-info 1:0:0
+
+libmate_window_settings_la_LIBADD = $(MATECC_LIBS)
+
+libmate_window_settings_la_SOURCES = \
+ mate-window-manager.c \
+ mate-window-manager.h \
+ mate-wm-manager.c \
+ mate-wm-manager.h
+
+libmate_window_settingsincludedir = $(includedir)/mate-window-settings-2.0
+
+libmate_window_settingsinclude_HEADERS = \
+ mate-window-manager.h \
+ mate-wm-manager.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = mate-window-settings-2.0.pc
+
+EXTRA_DIST = \
+ mate-window-settings-2.0.pc.in
+
+wms_flags = -export_dynamic -avoid-version -module
+wmsdir = $(WM_MODULE_DIR)
+
+wms_LTLIBRARIES = \
+ libmarco.la
+
+libmarco_la_SOURCES = \
+ marco-window-manager.c \
+ marco-window-manager.h
+
+libmarco_la_LDFLAGS = $(wms_flags)
+libmarco_la_LIBADD = \
+ $(MATECC_LIBS) \
+ libmate-window-settings.la
+
+-include $(top_srcdir)/git.mk
diff --git a/libwindow-settings/Makefile.in b/libwindow-settings/Makefile.in
new file mode 100644
index 00000000..a38e9328
--- /dev/null
+++ b/libwindow-settings/Makefile.in
@@ -0,0 +1,792 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = libwindow-settings
+DIST_COMMON = $(libmate_window_settingsinclude_HEADERS) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/mate-window-settings-2.0.pc.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/mate-doc-utils.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = mate-window-settings-2.0.pc
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(wmsdir)" \
+ "$(DESTDIR)$(pkgconfigdir)" \
+ "$(DESTDIR)$(libmate_window_settingsincludedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(wms_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libmarco_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ libmate-window-settings.la
+am_libmarco_la_OBJECTS = marco-window-manager.lo
+libmarco_la_OBJECTS = $(am_libmarco_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libmarco_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libmarco_la_LDFLAGS) $(LDFLAGS) -o $@
+libmate_window_settings_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libmate_window_settings_la_OBJECTS = mate-window-manager.lo \
+ mate-wm-manager.lo
+libmate_window_settings_la_OBJECTS = \
+ $(am_libmate_window_settings_la_OBJECTS)
+libmate_window_settings_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(libmate_window_settings_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libmarco_la_SOURCES) $(libmate_window_settings_la_SOURCES)
+DIST_SOURCES = $(libmarco_la_SOURCES) \
+ $(libmate_window_settings_la_SOURCES)
+DATA = $(pkgconfig_DATA)
+HEADERS = $(libmate_window_settingsinclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APP_INDICATOR_CFLAGS = @APP_INDICATOR_CFLAGS@
+APP_INDICATOR_LIBS = @APP_INDICATOR_LIBS@
+AR = @AR@
+AT_CAPPLET_CFLAGS = @AT_CAPPLET_CFLAGS@
+AT_CAPPLET_LIBS = @AT_CAPPLET_LIBS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CAPPLET_CFLAGS = @CAPPLET_CFLAGS@
+CAPPLET_LIBS = @CAPPLET_LIBS@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DEFAULT_APPLICATIONS_CAPPLET_CFLAGS = @DEFAULT_APPLICATIONS_CAPPLET_CFLAGS@
+DEFAULT_APPLICATIONS_CAPPLET_LIBS = @DEFAULT_APPLICATIONS_CAPPLET_LIBS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
+DISPLAY_CAPPLET_CFLAGS = @DISPLAY_CAPPLET_CFLAGS@
+DISPLAY_CAPPLET_LIBS = @DISPLAY_CAPPLET_LIBS@
+DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
+DLLTOOL = @DLLTOOL@
+DOC_USER_FORMATS = @DOC_USER_FORMATS@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTERNAL_LIBSLAB_CFLAGS = @EXTERNAL_LIBSLAB_CFLAGS@
+EXTERNAL_LIBSLAB_LIBS = @EXTERNAL_LIBSLAB_LIBS@
+FGREP = @FGREP@
+FONT_CAPPLET_CFLAGS = @FONT_CAPPLET_CFLAGS@
+FONT_CAPPLET_LIBS = @FONT_CAPPLET_LIBS@
+FONT_VIEWER_CFLAGS = @FONT_VIEWER_CFLAGS@
+FONT_VIEWER_LIBS = @FONT_VIEWER_LIBS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GIO_CFLAGS = @GIO_CFLAGS@
+GIO_LIBS = @GIO_LIBS@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GSD_DBUS_CFLAGS = @GSD_DBUS_CFLAGS@
+GSD_DBUS_LIBS = @GSD_DBUS_LIBS@
+GTK_ENGINE_DIR = @GTK_ENGINE_DIR@
+HELP_DIR = @HELP_DIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCANBERRA_GTK_CFLAGS = @LIBCANBERRA_GTK_CFLAGS@
+LIBCANBERRA_GTK_LIBS = @LIBCANBERRA_GTK_LIBS@
+LIBEBOOK_CFLAGS = @LIBEBOOK_CFLAGS@
+LIBEBOOK_LIBS = @LIBEBOOK_LIBS@
+LIBMATEKBDUI_CFLAGS = @LIBMATEKBDUI_CFLAGS@
+LIBMATEKBDUI_LIBS = @LIBMATEKBDUI_LIBS@
+LIBMATEKBD_CFLAGS = @LIBMATEKBD_CFLAGS@
+LIBMATEKBD_LIBS = @LIBMATEKBD_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBSLAB_CFLAGS = @LIBSLAB_CFLAGS@
+LIBSLAB_LIBS = @LIBSLAB_LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MARCO_CFLAGS = @MARCO_CFLAGS@
+MARCO_LIBS = @MARCO_LIBS@
+MATECC_CAPPLETS_CFLAGS = @MATECC_CAPPLETS_CFLAGS@
+MATECC_CAPPLETS_CLEANFILES = @MATECC_CAPPLETS_CLEANFILES@
+MATECC_CAPPLETS_EXTRA_DIST = @MATECC_CAPPLETS_EXTRA_DIST@
+MATECC_CAPPLETS_LIBS = @MATECC_CAPPLETS_LIBS@
+MATECC_CFLAGS = @MATECC_CFLAGS@
+MATECC_LIBS = @MATECC_LIBS@
+MATECC_SHELL_CFLAGS = @MATECC_SHELL_CFLAGS@
+MATECC_SHELL_LIBS = @MATECC_SHELL_LIBS@
+MATECONFTOOL = @MATECONFTOOL@
+MATECONF_SCHEMA_CONFIG_SOURCE = @MATECONF_SCHEMA_CONFIG_SOURCE@
+MATECONF_SCHEMA_FILE_DIR = @MATECONF_SCHEMA_FILE_DIR@
+MATE_DESKTOP_CFLAGS = @MATE_DESKTOP_CFLAGS@
+MATE_DESKTOP_LIBS = @MATE_DESKTOP_LIBS@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OMF_DIR = @OMF_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SCREENSAVER_LIBS = @SCREENSAVER_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TYPING_BREAK = @TYPING_BREAK@
+TYPING_CFLAGS = @TYPING_CFLAGS@
+TYPING_LIBS = @TYPING_LIBS@
+UPDATE_MIME_DATABASE = @UPDATE_MIME_DATABASE@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+XCURSOR_CFLAGS = @XCURSOR_CFLAGS@
+XCURSOR_LIBS = @XCURSOR_LIBS@
+XF86MISC_LIBS = @XF86MISC_LIBS@
+XGETTEXT = @XGETTEXT@
+XINPUT_CFLAGS = @XINPUT_CFLAGS@
+XINPUT_LIBS = @XINPUT_LIBS@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+WM_MODULE_DIR = $(libdir)/window-manager-settings
+INCLUDES = \
+ -DMATELOCALEDIR="\"$(datadir)/locale\"" \
+ -DMATE_ICONDIR=\""$(datadir)/pixmaps"\" \
+ -DG_LOG_DOMAIN=\"capplet-common\" \
+ -DMATE_WM_PROPERTY_PATH=\"$(datadir)/mate/wm-properties\" \
+ -DMATE_WINDOW_MANAGER_MODULE_PATH=\""$(WM_MODULE_DIR)"\" \
+ -I$(top_srcdir)/ \
+ @CAPPLET_CFLAGS@ \
+ -DMARCO_THEME_DIR=\""$(datadir)/themes"\"
+
+lib_LTLIBRARIES = libmate-window-settings.la
+libmate_window_settings_la_LDFLAGS = \
+ -export_dynamic \
+ -no-undefined \
+ -version-info 1:0:0
+
+libmate_window_settings_la_LIBADD = $(MATECC_LIBS)
+libmate_window_settings_la_SOURCES = \
+ mate-window-manager.c \
+ mate-window-manager.h \
+ mate-wm-manager.c \
+ mate-wm-manager.h
+
+libmate_window_settingsincludedir = $(includedir)/mate-window-settings-2.0
+libmate_window_settingsinclude_HEADERS = \
+ mate-window-manager.h \
+ mate-wm-manager.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = mate-window-settings-2.0.pc
+EXTRA_DIST = \
+ mate-window-settings-2.0.pc.in
+
+wms_flags = -export_dynamic -avoid-version -module
+wmsdir = $(WM_MODULE_DIR)
+wms_LTLIBRARIES = \
+ libmarco.la
+
+libmarco_la_SOURCES = \
+ marco-window-manager.c \
+ marco-window-manager.h
+
+libmarco_la_LDFLAGS = $(wms_flags)
+libmarco_la_LIBADD = \
+ $(MATECC_LIBS) \
+ libmate-window-settings.la
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libwindow-settings/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu libwindow-settings/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+mate-window-settings-2.0.pc: $(top_builddir)/config.status $(srcdir)/mate-window-settings-2.0.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+install-wmsLTLIBRARIES: $(wms_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(wmsdir)" || $(MKDIR_P) "$(DESTDIR)$(wmsdir)"
+ @list='$(wms_LTLIBRARIES)'; test -n "$(wmsdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(wmsdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(wmsdir)"; \
+ }
+
+uninstall-wmsLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(wms_LTLIBRARIES)'; test -n "$(wmsdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(wmsdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(wmsdir)/$$f"; \
+ done
+
+clean-wmsLTLIBRARIES:
+ -test -z "$(wms_LTLIBRARIES)" || rm -f $(wms_LTLIBRARIES)
+ @list='$(wms_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libmarco.la: $(libmarco_la_OBJECTS) $(libmarco_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libmarco_la_LINK) -rpath $(wmsdir) $(libmarco_la_OBJECTS) $(libmarco_la_LIBADD) $(LIBS)
+libmate-window-settings.la: $(libmate_window_settings_la_OBJECTS) $(libmate_window_settings_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libmate_window_settings_la_LINK) -rpath $(libdir) $(libmate_window_settings_la_OBJECTS) $(libmate_window_settings_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marco-window-manager.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mate-window-manager.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mate-wm-manager.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+install-libmate_window_settingsincludeHEADERS: $(libmate_window_settingsinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libmate_window_settingsincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libmate_window_settingsincludedir)"
+ @list='$(libmate_window_settingsinclude_HEADERS)'; test -n "$(libmate_window_settingsincludedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libmate_window_settingsincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libmate_window_settingsincludedir)" || exit $$?; \
+ done
+
+uninstall-libmate_window_settingsincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libmate_window_settingsinclude_HEADERS)'; test -n "$(libmate_window_settingsincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libmate_window_settingsincludedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libmate_window_settingsincludedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(wmsdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(libmate_window_settingsincludedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ clean-wmsLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-libmate_window_settingsincludeHEADERS \
+ install-pkgconfigDATA install-wmsLTLIBRARIES
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES \
+ uninstall-libmate_window_settingsincludeHEADERS \
+ uninstall-pkgconfigDATA uninstall-wmsLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-wmsLTLIBRARIES ctags \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libLTLIBRARIES \
+ install-libmate_window_settingsincludeHEADERS install-man \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip install-wmsLTLIBRARIES \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-libLTLIBRARIES \
+ uninstall-libmate_window_settingsincludeHEADERS \
+ uninstall-pkgconfigDATA uninstall-wmsLTLIBRARIES
+
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/libwindow-settings/marco-window-manager.c b/libwindow-settings/marco-window-manager.c
new file mode 100644
index 00000000..14d4adb1
--- /dev/null
+++ b/libwindow-settings/marco-window-manager.c
@@ -0,0 +1,520 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/* marco-window-manager.c
+ * Copyright (C) 2002 Seth Nickell
+ * Copyright (C) 2002 Red Hat, Inc.
+ *
+ * Written by: Seth Nickell <[email protected]>,
+ * Havoc Pennington <[email protected]>
+ *
+ * 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.
+ */
+
+#include <config.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <string.h>
+#include <glib/gi18n.h>
+#include <mateconf/mateconf-client.h>
+
+#include "marco-window-manager.h"
+
+#define MARCO_THEME_KEY "/apps/marco/general/theme"
+#define MARCO_FONT_KEY "/apps/marco/general/titlebar_font"
+#define MARCO_FOCUS_KEY "/apps/marco/general/focus_mode"
+#define MARCO_USE_SYSTEM_FONT_KEY "/apps/marco/general/titlebar_uses_system_font"
+#define MARCO_AUTORAISE_KEY "/apps/marco/general/auto_raise"
+#define MARCO_AUTORAISE_DELAY_KEY "/apps/marco/general/auto_raise_delay"
+#define MARCO_MOUSE_MODIFIER_KEY "/apps/marco/general/mouse_button_modifier"
+#define MARCO_DOUBLE_CLICK_TITLEBAR_KEY "/apps/marco/general/action_double_click_titlebar"
+
+enum
+{
+ DOUBLE_CLICK_MAXIMIZE,
+ DOUBLE_CLICK_MAXIMIZE_VERTICALLY,
+ DOUBLE_CLICK_MAXIMIZE_HORIZONTALLY,
+ DOUBLE_CLICK_MINIMIZE,
+ DOUBLE_CLICK_SHADE,
+ DOUBLE_CLICK_NONE
+};
+
+static MateWindowManagerClass *parent_class;
+
+struct _MarcoWindowManagerPrivate {
+ MateConfClient *mateconf;
+ char *font;
+ char *theme;
+ char *mouse_modifier;
+};
+
+static void
+value_changed (MateConfClient *client,
+ const gchar *key,
+ MateConfValue *value,
+ void *data)
+{
+ MarcoWindowManager *meta_wm;
+
+ meta_wm = MARCO_WINDOW_MANAGER (data);
+
+ mate_window_manager_settings_changed (MATE_WINDOW_MANAGER (meta_wm));
+}
+
+/* this function is called when the shared lib is loaded */
+GObject *
+window_manager_new (int expected_interface_version)
+{
+ GObject *wm;
+
+ if (expected_interface_version != MATE_WINDOW_MANAGER_INTERFACE_VERSION) {
+ g_warning ("Marco window manager module wasn't compiled with the current version of mate-control-center");
+ return NULL;
+ }
+
+ wm = g_object_new (marco_window_manager_get_type (), NULL);
+
+ return wm;
+}
+
+static GList *
+add_themes_from_dir (GList *current_list, const char *path)
+{
+ DIR *theme_dir;
+ struct dirent *entry;
+ char *theme_file_path;
+ GList *node;
+ gboolean found = FALSE;
+
+ if (!(g_file_test (path, G_FILE_TEST_EXISTS) && g_file_test (path, G_FILE_TEST_IS_DIR))) {
+ return current_list;
+ }
+
+ theme_dir = opendir (path);
+ /* If this is NULL, then we couldn't open ~/.themes. The test above
+ * only checks existence, not wether we can really read it.*/
+ if (theme_dir == NULL)
+ return current_list;
+
+ for (entry = readdir (theme_dir); entry != NULL; entry = readdir (theme_dir)) {
+ theme_file_path = g_build_filename (path, entry->d_name, "marco-1/marco-theme-1.xml", NULL);
+
+ if (g_file_test (theme_file_path, G_FILE_TEST_EXISTS)) {
+
+ for (node = current_list; (node != NULL) && (!found); node = node->next) {
+ found = (strcmp (node->data, entry->d_name) == 0);
+ }
+
+ if (!found) {
+ current_list = g_list_prepend (current_list, g_strdup (entry->d_name));
+ }
+ }
+
+ found = FALSE;
+ /*g_free (entry);*/
+ g_free (theme_file_path);
+ }
+
+ closedir (theme_dir);
+
+ return current_list;
+}
+
+static GList *
+marco_get_theme_list (MateWindowManager *wm)
+{
+ GList *themes = NULL;
+ char *home_dir_themes;
+
+ home_dir_themes = g_build_filename (g_get_home_dir (), ".themes", NULL);
+
+ themes = add_themes_from_dir (themes, MARCO_THEME_DIR);
+ themes = add_themes_from_dir (themes, "/usr/share/themes");
+ themes = add_themes_from_dir (themes, home_dir_themes);
+
+ g_free (home_dir_themes);
+
+ return themes;
+}
+
+static char *
+marco_get_user_theme_folder (MateWindowManager *wm)
+{
+ return g_build_filename (g_get_home_dir (), ".themes", NULL);
+}
+
+static void
+marco_change_settings (MateWindowManager *wm,
+ const MateWMSettings *settings)
+{
+ MarcoWindowManager *meta_wm;
+
+ meta_wm = MARCO_WINDOW_MANAGER (wm);
+
+ if (settings->flags & MATE_WM_SETTING_MOUSE_FOCUS)
+ mateconf_client_set_string (meta_wm->p->mateconf,
+ MARCO_FOCUS_KEY,
+ settings->focus_follows_mouse ?
+ "sloppy" : "click", NULL);
+
+ if (settings->flags & MATE_WM_SETTING_AUTORAISE)
+ mateconf_client_set_bool (meta_wm->p->mateconf,
+ MARCO_AUTORAISE_KEY,
+ settings->autoraise, NULL);
+
+ if (settings->flags & MATE_WM_SETTING_AUTORAISE_DELAY)
+ mateconf_client_set_int (meta_wm->p->mateconf,
+ MARCO_AUTORAISE_DELAY_KEY,
+ settings->autoraise_delay, NULL);
+
+ if (settings->flags & MATE_WM_SETTING_FONT) {
+ mateconf_client_set_string (meta_wm->p->mateconf,
+ MARCO_FONT_KEY,
+ settings->font, NULL);
+ }
+
+ if (settings->flags & MATE_WM_SETTING_MOUSE_MOVE_MODIFIER) {
+ char *value;
+
+ value = g_strdup_printf ("<%s>", settings->mouse_move_modifier);
+ mateconf_client_set_string (meta_wm->p->mateconf,
+ MARCO_MOUSE_MODIFIER_KEY,
+ value, NULL);
+ g_free (value);
+ }
+
+ if (settings->flags & MATE_WM_SETTING_THEME) {
+ mateconf_client_set_string (meta_wm->p->mateconf,
+ MARCO_THEME_KEY,
+ settings->theme, NULL);
+ }
+
+ if (settings->flags & MATE_WM_SETTING_DOUBLE_CLICK_ACTION) {
+ const char *action;
+
+ action = NULL;
+
+ switch (settings->double_click_action) {
+ case DOUBLE_CLICK_SHADE:
+ action = "toggle_shade";
+ break;
+ case DOUBLE_CLICK_MAXIMIZE:
+ action = "toggle_maximize";
+ break;
+ case DOUBLE_CLICK_MAXIMIZE_VERTICALLY:
+ action = "toggle_maximize_vertically";
+ break;
+ case DOUBLE_CLICK_MAXIMIZE_HORIZONTALLY:
+ action = "toggle_maximize_horizontally";
+ break;
+ case DOUBLE_CLICK_MINIMIZE:
+ action = "minimize";
+ break;
+ case DOUBLE_CLICK_NONE:
+ action = "none";
+ break;
+ }
+
+ if (action != NULL) {
+ mateconf_client_set_string (meta_wm->p->mateconf,
+ MARCO_DOUBLE_CLICK_TITLEBAR_KEY,
+ action, NULL);
+ }
+ }
+}
+
+static void
+marco_get_settings (MateWindowManager *wm,
+ MateWMSettings *settings)
+{
+ int to_get;
+ MarcoWindowManager *meta_wm;
+
+ meta_wm = MARCO_WINDOW_MANAGER (wm);
+
+ to_get = settings->flags;
+ settings->flags = 0;
+
+ if (to_get & MATE_WM_SETTING_MOUSE_FOCUS) {
+ char *str;
+
+ str = mateconf_client_get_string (meta_wm->p->mateconf,
+ MARCO_FOCUS_KEY, NULL);
+ settings->focus_follows_mouse = FALSE;
+ if (str && (strcmp (str, "sloppy") == 0 ||
+ strcmp (str, "mouse") == 0))
+ settings->focus_follows_mouse = TRUE;
+
+ g_free (str);
+
+ settings->flags |= MATE_WM_SETTING_MOUSE_FOCUS;
+ }
+
+ if (to_get & MATE_WM_SETTING_AUTORAISE) {
+ settings->autoraise = mateconf_client_get_bool (meta_wm->p->mateconf,
+ MARCO_AUTORAISE_KEY,
+ NULL);
+ settings->flags |= MATE_WM_SETTING_AUTORAISE;
+ }
+
+ if (to_get & MATE_WM_SETTING_AUTORAISE_DELAY) {
+ settings->autoraise_delay =
+ mateconf_client_get_int (meta_wm->p->mateconf,
+ MARCO_AUTORAISE_DELAY_KEY,
+ NULL);
+ settings->flags |= MATE_WM_SETTING_AUTORAISE_DELAY;
+ }
+
+ if (to_get & MATE_WM_SETTING_FONT) {
+ char *str;
+
+ str = mateconf_client_get_string (meta_wm->p->mateconf,
+ MARCO_FONT_KEY,
+ NULL);
+
+ if (str == NULL)
+ str = g_strdup ("Sans Bold 12");
+
+ if (meta_wm->p->font &&
+ strcmp (meta_wm->p->font, str) == 0) {
+ g_free (str);
+ } else {
+ g_free (meta_wm->p->font);
+ meta_wm->p->font = str;
+ }
+
+ settings->font = meta_wm->p->font;
+
+ settings->flags |= MATE_WM_SETTING_FONT;
+ }
+
+ if (to_get & MATE_WM_SETTING_MOUSE_MOVE_MODIFIER) {
+ char *str;
+ const char *new;
+
+ str = mateconf_client_get_string (meta_wm->p->mateconf,
+ MARCO_MOUSE_MODIFIER_KEY,
+ NULL);
+
+ if (str == NULL)
+ str = g_strdup ("<Super>");
+
+ if (strcmp (str, "<Super>") == 0)
+ new = "Super";
+ else if (strcmp (str, "<Alt>") == 0)
+ new = "Alt";
+ else if (strcmp (str, "<Meta>") == 0)
+ new = "Meta";
+ else if (strcmp (str, "<Hyper>") == 0)
+ new = "Hyper";
+ else if (strcmp (str, "<Control>") == 0)
+ new = "Control";
+ else
+ new = NULL;
+
+ if (new && meta_wm->p->mouse_modifier &&
+ strcmp (new, meta_wm->p->mouse_modifier) == 0) {
+ /* unchanged */;
+ } else {
+ g_free (meta_wm->p->mouse_modifier);
+ meta_wm->p->mouse_modifier = g_strdup (new);
+ }
+
+ g_free (str);
+
+ settings->mouse_move_modifier = meta_wm->p->mouse_modifier;
+
+ settings->flags |= MATE_WM_SETTING_MOUSE_MOVE_MODIFIER;
+ }
+
+ if (to_get & MATE_WM_SETTING_THEME) {
+ char *str;
+
+ str = mateconf_client_get_string (meta_wm->p->mateconf,
+ MARCO_THEME_KEY,
+ NULL);
+
+ if (str == NULL)
+ str = g_strdup ("Atlanta");
+
+ g_free (meta_wm->p->theme);
+ meta_wm->p->theme = str;
+ settings->theme = meta_wm->p->theme;
+
+ settings->flags |= MATE_WM_SETTING_THEME;
+ }
+
+ if (to_get & MATE_WM_SETTING_DOUBLE_CLICK_ACTION) {
+ char *str;
+
+ str = mateconf_client_get_string (meta_wm->p->mateconf,
+ MARCO_DOUBLE_CLICK_TITLEBAR_KEY,
+ NULL);
+
+ if (str == NULL)
+ str = g_strdup ("toggle_shade");
+
+ if (strcmp (str, "toggle_shade") == 0)
+ settings->double_click_action = DOUBLE_CLICK_SHADE;
+ else if (strcmp (str, "toggle_maximize") == 0)
+ settings->double_click_action = DOUBLE_CLICK_MAXIMIZE;
+ else if (strcmp (str, "toggle_maximize_horizontally") == 0 ||
+ strcmp (str, "toggle_maximize_horiz") == 0)
+ settings->double_click_action = DOUBLE_CLICK_MAXIMIZE_HORIZONTALLY;
+ else if (strcmp (str, "toggle_maximize_vertically") == 0 ||
+ strcmp (str, "toggle_maximize_vert") == 0)
+ settings->double_click_action = DOUBLE_CLICK_MAXIMIZE_VERTICALLY;
+ else if (strcmp (str, "minimize") == 0)
+ settings->double_click_action = DOUBLE_CLICK_MINIMIZE;
+ else if (strcmp (str, "none") == 0)
+ settings->double_click_action = DOUBLE_CLICK_NONE;
+ else
+ settings->double_click_action = DOUBLE_CLICK_SHADE;
+
+ g_free (str);
+
+ settings->flags |= MATE_WM_SETTING_DOUBLE_CLICK_ACTION;
+ }
+}
+
+static int
+marco_get_settings_mask (MateWindowManager *wm)
+{
+ return MATE_WM_SETTING_MASK;
+}
+
+static void
+marco_get_double_click_actions (MateWindowManager *wm,
+ const MateWMDoubleClickAction **actions_p,
+ int *n_actions_p)
+{
+ static MateWMDoubleClickAction actions[] = {
+ { DOUBLE_CLICK_MAXIMIZE, N_("Maximize") },
+ { DOUBLE_CLICK_MAXIMIZE_VERTICALLY, N_("Maximize Vertically") },
+ { DOUBLE_CLICK_MAXIMIZE_HORIZONTALLY, N_("Maximize Horizontally") },
+ { DOUBLE_CLICK_MINIMIZE, N_("Minimize") },
+ { DOUBLE_CLICK_SHADE, N_("Roll up") },
+ { DOUBLE_CLICK_NONE, N_("None") }
+ };
+ static gboolean initialized = FALSE;
+
+ if (!initialized) {
+ int i;
+
+ initialized = TRUE;
+ i = 0;
+ while (i < (int) G_N_ELEMENTS (actions)) {
+ g_assert (actions[i].number == i);
+ actions[i].human_readable_name = _(actions[i].human_readable_name);
+
+ ++i;
+ }
+ }
+
+ *actions_p = actions;
+ *n_actions_p = (int) G_N_ELEMENTS (actions);
+}
+
+static void
+marco_window_manager_init (MarcoWindowManager *marco_window_manager,
+ MarcoWindowManagerClass *class)
+{
+ marco_window_manager->p = g_new0 (MarcoWindowManagerPrivate, 1);
+ marco_window_manager->p->mateconf = mateconf_client_get_default ();
+ marco_window_manager->p->font = NULL;
+ marco_window_manager->p->theme = NULL;
+ marco_window_manager->p->mouse_modifier = NULL;
+
+ mateconf_client_add_dir (marco_window_manager->p->mateconf,
+ "/apps/marco/general",
+ MATECONF_CLIENT_PRELOAD_ONELEVEL,
+ NULL);
+
+ g_signal_connect (G_OBJECT (marco_window_manager->p->mateconf),
+ "value_changed",
+ G_CALLBACK (value_changed), marco_window_manager);
+}
+
+static void
+marco_window_manager_finalize (GObject *object)
+{
+ MarcoWindowManager *marco_window_manager;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (IS_MARCO_WINDOW_MANAGER (object));
+
+ marco_window_manager = MARCO_WINDOW_MANAGER (object);
+
+ g_signal_handlers_disconnect_by_func (G_OBJECT (marco_window_manager->p->mateconf),
+ G_CALLBACK (value_changed),
+ marco_window_manager);
+
+ g_object_unref (G_OBJECT (marco_window_manager->p->mateconf));
+ g_free (marco_window_manager->p);
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+
+static void
+marco_window_manager_class_init (MarcoWindowManagerClass *class)
+{
+ GObjectClass *object_class;
+ MateWindowManagerClass *wm_class;
+
+ object_class = G_OBJECT_CLASS (class);
+ wm_class = MATE_WINDOW_MANAGER_CLASS (class);
+
+ object_class->finalize = marco_window_manager_finalize;
+
+ wm_class->change_settings = marco_change_settings;
+ wm_class->get_settings = marco_get_settings;
+ wm_class->get_settings_mask = marco_get_settings_mask;
+ wm_class->get_user_theme_folder = marco_get_user_theme_folder;
+ wm_class->get_theme_list = marco_get_theme_list;
+ wm_class->get_double_click_actions = marco_get_double_click_actions;
+
+ parent_class = g_type_class_peek_parent (class);
+}
+
+GType
+marco_window_manager_get_type (void)
+{
+ static GType marco_window_manager_type = 0;
+
+ if (!marco_window_manager_type) {
+ static GTypeInfo marco_window_manager_info = {
+ sizeof (MarcoWindowManagerClass),
+ NULL, /* GBaseInitFunc */
+ NULL, /* GBaseFinalizeFunc */
+ (GClassInitFunc) marco_window_manager_class_init,
+ NULL, /* GClassFinalizeFunc */
+ NULL, /* user-supplied data */
+ sizeof (MarcoWindowManager),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) marco_window_manager_init,
+ NULL
+ };
+
+ marco_window_manager_type =
+ g_type_register_static (mate_window_manager_get_type (),
+ "MarcoWindowManager",
+ &marco_window_manager_info, 0);
+ }
+
+ return marco_window_manager_type;
+}
+
+
diff --git a/libwindow-settings/marco-window-manager.h b/libwindow-settings/marco-window-manager.h
new file mode 100644
index 00000000..b4ef8c53
--- /dev/null
+++ b/libwindow-settings/marco-window-manager.h
@@ -0,0 +1,29 @@
+#ifndef MARCO_WINDOW_MANAGER_H
+#define MARCO_WINDOW_MANAGER_H
+
+#include <glib-object.h>
+#include "mate-window-manager.h"
+
+#define MARCO_WINDOW_MANAGER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, marco_window_manager_get_type (), MarcoWindowManager)
+#define MARCO_WINDOW_MANAGER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, marco_window_manager_get_type (), MarcoWindowManagerClass)
+#define IS_MARCO_WINDOW_MANAGER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, marco_window_manager_get_type ())
+
+typedef struct _MarcoWindowManager MarcoWindowManager;
+typedef struct _MarcoWindowManagerClass MarcoWindowManagerClass;
+
+typedef struct _MarcoWindowManagerPrivate MarcoWindowManagerPrivate;
+
+struct _MarcoWindowManager
+{
+ MateWindowManager parent;
+ MarcoWindowManagerPrivate *p;
+};
+
+struct _MarcoWindowManagerClass
+{
+ MateWindowManagerClass klass;
+};
+
+GType marco_window_manager_get_type (void);
+
+#endif
diff --git a/libwindow-settings/mate-window-manager.c b/libwindow-settings/mate-window-manager.c
new file mode 100644
index 00000000..a5ffcf53
--- /dev/null
+++ b/libwindow-settings/mate-window-manager.c
@@ -0,0 +1,273 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/* mate-window-manager.h
+ * Copyright (C) 2002 Seth Nickell
+ * Copyright (C) 2002 Red Hat, Inc.
+ *
+ * Written by: Seth Nickell <[email protected]>,
+ * Havoc Pennington <[email protected]>
+ *
+ * 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.
+ */
+
+#include "mate-window-manager.h"
+
+#include <gmodule.h>
+
+static GObjectClass *parent_class;
+
+struct _MateWindowManagerPrivate {
+ char *window_manager_name;
+ MateDesktopItem *ditem;
+};
+
+GObject *
+mate_window_manager_new (MateDesktopItem *it)
+{
+ const char *settings_lib;
+ char *module_name;
+ MateWindowManagerNewFunc wm_new_func = NULL;
+ GObject *wm;
+ GModule *module;
+ gboolean success;
+
+ settings_lib = mate_desktop_item_get_string (it, "X-MATE-WMSettingsModule");
+
+ module_name = g_module_build_path (MATE_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 ());
+ g_free (module_name);
+ 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);
+ g_free (module_name);
+ return NULL;
+ }
+
+ g_free (module_name);
+
+ wm = (* wm_new_func) (MATE_WINDOW_MANAGER_INTERFACE_VERSION);
+
+ if (wm == NULL)
+ return NULL;
+
+ (MATE_WINDOW_MANAGER (wm))->p->window_manager_name = g_strdup (mate_desktop_item_get_string (it, MATE_DESKTOP_ITEM_NAME));
+ (MATE_WINDOW_MANAGER (wm))->p->ditem = mate_desktop_item_ref (it);
+
+ return wm;
+}
+
+const char *
+mate_window_manager_get_name (MateWindowManager *wm)
+{
+ return wm->p->window_manager_name;
+}
+
+MateDesktopItem *
+mate_window_manager_get_ditem (MateWindowManager *wm)
+{
+ return mate_desktop_item_ref (wm->p->ditem);
+}
+
+GList *
+mate_window_manager_get_theme_list (MateWindowManager *wm)
+{
+ MateWindowManagerClass *klass = MATE_WINDOW_MANAGER_GET_CLASS (wm);
+ if (klass->get_theme_list)
+ return klass->get_theme_list (wm);
+ else
+ return NULL;
+}
+
+char *
+mate_window_manager_get_user_theme_folder (MateWindowManager *wm)
+{
+ MateWindowManagerClass *klass = MATE_WINDOW_MANAGER_GET_CLASS (wm);
+ if (klass->get_user_theme_folder)
+ return klass->get_user_theme_folder (wm);
+ else
+ return NULL;
+}
+
+void
+mate_window_manager_get_double_click_actions (MateWindowManager *wm,
+ const MateWMDoubleClickAction **actions,
+ int *n_actions)
+{
+ MateWindowManagerClass *klass = MATE_WINDOW_MANAGER_GET_CLASS (wm);
+
+ *actions = NULL;
+ *n_actions = 0;
+
+ if (klass->get_double_click_actions)
+ klass->get_double_click_actions (wm, actions, n_actions);
+}
+
+void
+mate_window_manager_change_settings (MateWindowManager *wm,
+ const MateWMSettings *settings)
+{
+ MateWindowManagerClass *klass = MATE_WINDOW_MANAGER_GET_CLASS (wm);
+
+ (* klass->change_settings) (wm, settings);
+}
+
+void
+mate_window_manager_get_settings (MateWindowManager *wm,
+ MateWMSettings *settings)
+{
+ MateWindowManagerClass *klass = MATE_WINDOW_MANAGER_GET_CLASS (wm);
+ int mask;
+
+ mask = (* klass->get_settings_mask) (wm);
+ settings->flags &= mask; /* avoid back compat issues by not returning
+ * fields to the caller that the WM module
+ * doesn't know about
+ */
+
+ (* klass->get_settings) (wm, settings);
+}
+
+static void
+mate_window_manager_init (MateWindowManager *mate_window_manager, MateWindowManagerClass *class)
+{
+ mate_window_manager->p = g_new0 (MateWindowManagerPrivate, 1);
+}
+
+static void
+mate_window_manager_finalize (GObject *object)
+{
+ MateWindowManager *mate_window_manager;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (IS_MATE_WINDOW_MANAGER (object));
+
+ mate_window_manager = MATE_WINDOW_MANAGER (object);
+
+ g_free (mate_window_manager->p);
+
+ parent_class->finalize (object);
+}
+
+enum {
+ SETTINGS_CHANGED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+static void
+mate_window_manager_class_init (MateWindowManagerClass *class)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (class);
+
+ object_class->finalize = mate_window_manager_finalize;
+
+ parent_class = g_type_class_peek_parent (class);
+
+
+ signals[SETTINGS_CHANGED] =
+ g_signal_new ("settings_changed",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE,
+ G_STRUCT_OFFSET (MateWindowManagerClass, settings_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+}
+
+
+GType
+mate_window_manager_get_type (void)
+{
+ static GType mate_window_manager_type = 0;
+
+ if (!mate_window_manager_type) {
+ static GTypeInfo mate_window_manager_info = {
+ sizeof (MateWindowManagerClass),
+ NULL, /* GBaseInitFunc */
+ NULL, /* GBaseFinalizeFunc */
+ (GClassInitFunc) mate_window_manager_class_init,
+ NULL, /* GClassFinalizeFunc */
+ NULL, /* user-supplied data */
+ sizeof (MateWindowManager),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) mate_window_manager_init,
+ NULL
+ };
+
+ mate_window_manager_type =
+ g_type_register_static (G_TYPE_OBJECT,
+ "MateWindowManager",
+ &mate_window_manager_info, 0);
+ }
+
+ return mate_window_manager_type;
+}
+
+
+void
+mate_window_manager_settings_changed (MateWindowManager *wm)
+{
+ g_signal_emit (wm, signals[SETTINGS_CHANGED], 0);
+}
+
+/* Helper functions for MateWMSettings */
+MateWMSettings *
+mate_wm_settings_copy (MateWMSettings *settings)
+{
+ MateWMSettings *retval;
+
+ g_return_val_if_fail (settings != NULL, NULL);
+
+ retval = g_new (MateWMSettings, 1);
+ *retval = *settings;
+
+ if (retval->flags & MATE_WM_SETTING_FONT)
+ retval->font = g_strdup (retval->font);
+ if (retval->flags & MATE_WM_SETTING_MOUSE_MOVE_MODIFIER)
+ retval->mouse_move_modifier = g_strdup (retval->mouse_move_modifier);
+ if (retval->flags & MATE_WM_SETTING_THEME)
+ retval->theme = g_strdup (retval->theme);
+
+ return retval;
+}
+
+void
+mate_wm_settings_free (MateWMSettings *settings)
+{
+ g_return_if_fail (settings != NULL);
+
+ if (settings->flags & MATE_WM_SETTING_FONT)
+ g_free ((void *) settings->font);
+ if (settings->flags & MATE_WM_SETTING_MOUSE_MOVE_MODIFIER)
+ g_free ((void *) settings->mouse_move_modifier);
+ if (settings->flags & MATE_WM_SETTING_THEME)
+ g_free ((void *)settings->theme);
+
+ g_free (settings);
+}
+
diff --git a/libwindow-settings/mate-window-manager.h b/libwindow-settings/mate-window-manager.h
new file mode 100644
index 00000000..45245985
--- /dev/null
+++ b/libwindow-settings/mate-window-manager.h
@@ -0,0 +1,168 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/* mate-window-manager.h
+ * Copyright (C) 2002 Seth Nickell
+ * Copyright (C) 2002 Red Hat, Inc.
+ *
+ * Written by: Seth Nickell <[email protected]>,
+ * Havoc Pennington <[email protected]>
+ *
+ * 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 MATE_WINDOW_MANAGER_H
+#define MATE_WINDOW_MANAGER_H
+
+#include <glib-object.h>
+
+#include <libmate/mate-desktop-item.h>
+
+/* Increment if backward-incompatible changes are made, so we get a clean
+ * error. In principle the libtool versioning handles this, but
+ * in combination with dlopen I don't quite trust that.
+ */
+#define MATE_WINDOW_MANAGER_INTERFACE_VERSION 1
+
+typedef GObject * (* MateWindowManagerNewFunc) (int expected_interface_version);
+
+typedef enum
+{
+ MATE_WM_SETTING_FONT = 1 << 0,
+ MATE_WM_SETTING_MOUSE_FOCUS = 1 << 1,
+ MATE_WM_SETTING_AUTORAISE = 1 << 2,
+ MATE_WM_SETTING_AUTORAISE_DELAY = 1 << 3,
+ MATE_WM_SETTING_MOUSE_MOVE_MODIFIER = 1 << 4,
+ MATE_WM_SETTING_THEME = 1 << 5,
+ MATE_WM_SETTING_DOUBLE_CLICK_ACTION = 1 << 6,
+ MATE_WM_SETTING_MASK =
+ MATE_WM_SETTING_FONT |
+ MATE_WM_SETTING_MOUSE_FOCUS |
+ MATE_WM_SETTING_AUTORAISE |
+ MATE_WM_SETTING_AUTORAISE_DELAY |
+ MATE_WM_SETTING_MOUSE_MOVE_MODIFIER |
+ MATE_WM_SETTING_THEME |
+ MATE_WM_SETTING_DOUBLE_CLICK_ACTION
+} MateWMSettingsFlags;
+
+typedef struct
+{
+ int number;
+ const char *human_readable_name;
+} MateWMDoubleClickAction;
+
+typedef struct
+{
+ MateWMSettingsFlags flags; /* this allows us to expand the struct
+ * while remaining binary compatible
+ */
+ const char *font;
+ int autoraise_delay;
+ /* One of the strings "Alt", "Control", "Super", "Hyper", "Meta" */
+ const char *mouse_move_modifier;
+ const char *theme;
+ int double_click_action;
+
+ guint focus_follows_mouse : 1;
+ guint autoraise : 1;
+
+} MateWMSettings;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MATE_WINDOW_MANAGER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mate_window_manager_get_type (), MateWindowManager)
+#define MATE_WINDOW_MANAGER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mate_window_manager_get_type (), MateWindowManagerClass)
+#define IS_MATE_WINDOW_MANAGER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mate_window_manager_get_type ())
+#define MATE_WINDOW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), mate_window_manager_get_type, MateWindowManagerClass))
+
+typedef struct _MateWindowManager MateWindowManager;
+typedef struct _MateWindowManagerClass MateWindowManagerClass;
+
+typedef struct _MateWindowManagerPrivate MateWindowManagerPrivate;
+
+struct _MateWindowManager
+{
+ GObject parent;
+
+ MateWindowManagerPrivate *p;
+};
+
+struct _MateWindowManagerClass
+{
+ GObjectClass klass;
+
+ void (* settings_changed) (MateWindowManager *wm);
+
+ void (* change_settings) (MateWindowManager *wm,
+ const MateWMSettings *settings);
+ void (* get_settings) (MateWindowManager *wm,
+ MateWMSettings *settings);
+
+ GList * (* get_theme_list) (MateWindowManager *wm);
+ char * (* get_user_theme_folder) (MateWindowManager *wm);
+
+ int (* get_settings_mask) (MateWindowManager *wm);
+
+ void (* get_double_click_actions) (MateWindowManager *wm,
+ const MateWMDoubleClickAction **actions,
+ int *n_actions);
+
+ void (* padding_func_1) (MateWindowManager *wm);
+ void (* padding_func_2) (MateWindowManager *wm);
+ void (* padding_func_3) (MateWindowManager *wm);
+ void (* padding_func_4) (MateWindowManager *wm);
+ void (* padding_func_5) (MateWindowManager *wm);
+ void (* padding_func_6) (MateWindowManager *wm);
+ void (* padding_func_7) (MateWindowManager *wm);
+ void (* padding_func_8) (MateWindowManager *wm);
+ void (* padding_func_9) (MateWindowManager *wm);
+ void (* padding_func_10) (MateWindowManager *wm);
+};
+
+GObject * mate_window_manager_new (MateDesktopItem *item);
+GType mate_window_manager_get_type (void);
+const char * mate_window_manager_get_name (MateWindowManager *wm);
+MateDesktopItem *mate_window_manager_get_ditem (MateWindowManager *wm);
+
+/* GList of char *'s */
+GList * mate_window_manager_get_theme_list (MateWindowManager *wm);
+char * mate_window_manager_get_user_theme_folder (MateWindowManager *wm);
+
+/* only uses fields with their flags set */
+void mate_window_manager_change_settings (MateWindowManager *wm,
+ const MateWMSettings *settings);
+/* only gets fields with their flags set (and if it fails to get a field,
+ * it unsets that flag, so flags should be checked on return)
+ */
+void mate_window_manager_get_settings (MateWindowManager *wm,
+ MateWMSettings *settings);
+
+void mate_window_manager_settings_changed (MateWindowManager *wm);
+
+void mate_window_manager_get_double_click_actions (MateWindowManager *wm,
+ const MateWMDoubleClickAction **actions,
+ int *n_actions);
+
+/* Helper functions for MateWMSettings */
+MateWMSettings *mate_wm_settings_copy (MateWMSettings *settings);
+void mate_wm_settings_free (MateWMSettings *settings);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* MATE_WINDOW_MANAGER_H */
diff --git a/libwindow-settings/mate-window-settings-2.0.pc.in b/libwindow-settings/mate-window-settings-2.0.pc.in
new file mode 100644
index 00000000..71645c23
--- /dev/null
+++ b/libwindow-settings/mate-window-settings-2.0.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: mate-window-settings-2.0
+Description: Utility library for getting window manager settings
+Requires: gtk+-2.0 mate-desktop-2.0
+Version: @VERSION@
+Libs: -L${libdir} -lmate-window-settings
+Cflags: -I${includedir}/mate-window-settings-2.0
diff --git a/libwindow-settings/mate-wm-manager.c b/libwindow-settings/mate-wm-manager.c
new file mode 100644
index 00000000..04097146
--- /dev/null
+++ b/libwindow-settings/mate-wm-manager.c
@@ -0,0 +1,320 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
+/* mate-wm-manager.c
+ * Copyright (C) 2002 Seth Nickell
+ * Copyright (C) 1998, 2002 Red Hat, Inc.
+ *
+ * Written by: Seth Nickell <[email protected]>,
+ * Havoc Pennington <[email protected]>
+ * Owen Taylor <[email protected]>,
+ * Bradford Hovinen <[email protected]>
+ *
+ * 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.
+ */
+
+#include <config.h>
+#include "mate-wm-manager.h"
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
+
+#include <sys/types.h>
+#include <dirent.h>
+#include <string.h>
+
+typedef struct {
+ MateDesktopItem *ditem;
+ char *name; /* human readable, localized */
+ char *identify_name; /* name we expect to be set on the screen */
+ char *exec;
+ char *config_exec;
+ char *config_tryexec;
+ char *module;
+ guint session_managed : 1;
+ guint is_user : 1;
+ guint is_present : 1;
+ guint is_config_present : 1;
+ MateWindowManager *mate_wm;
+} AvailableWindowManager;
+
+static gboolean done_scan = FALSE;
+static GList *available_wms;
+
+static void
+wm_free (AvailableWindowManager *wm)
+{
+ g_free (wm->name);
+ g_free (wm->exec);
+ g_free (wm->config_exec);
+ g_free (wm->config_tryexec);
+ g_free (wm->module);
+ g_free (wm->identify_name);
+
+ g_free (wm);
+}
+
+static GList *
+list_desktop_files_in_dir (gchar *directory)
+{
+ DIR *dir;
+ struct dirent *child;
+ GList *result = NULL;
+ gchar *suffix;
+
+ dir = opendir (directory);
+ if (dir == NULL)
+ return NULL;
+
+ while ((child = readdir (dir)) != NULL) {
+ /* Ignore files without .desktop suffix, and ignore
+ * .desktop files with no prefix
+ */
+ suffix = child->d_name + strlen (child->d_name) - 8;
+ /* strlen(".desktop") == 8 */
+
+ if (suffix <= child->d_name ||
+ strcmp (suffix, ".desktop") != 0)
+ continue;
+
+ result = g_list_prepend (result,
+ g_build_filename (directory, child->d_name, NULL));
+ }
+ closedir (dir);
+
+ return result;
+}
+
+static gint
+wm_compare (gconstpointer a, gconstpointer b)
+{
+ const AvailableWindowManager *wm_a = (const AvailableWindowManager *)a;
+ const AvailableWindowManager *wm_b = (const AvailableWindowManager *)b;
+
+ /* mmm, sloooow */
+
+ return g_utf8_collate (mate_desktop_item_get_string (wm_a->ditem, MATE_DESKTOP_ITEM_NAME),
+ mate_desktop_item_get_string (wm_b->ditem, MATE_DESKTOP_ITEM_NAME));
+}
+
+static AvailableWindowManager*
+wm_load (const char *desktop_file,
+ gboolean is_user)
+{
+ gchar *path;
+ AvailableWindowManager *wm;
+
+ wm = g_new0 (AvailableWindowManager, 1);
+
+ wm->ditem = mate_desktop_item_new_from_file (desktop_file, 0, NULL);
+
+ if (wm->ditem == NULL) {
+ g_free (wm);
+ return NULL;
+ }
+
+ mate_desktop_item_set_entry_type (wm->ditem, MATE_DESKTOP_ITEM_TYPE_APPLICATION);
+
+ wm->exec = g_strdup (mate_desktop_item_get_string (wm->ditem,
+ MATE_DESKTOP_ITEM_EXEC));
+
+ wm->name = g_strdup (mate_desktop_item_get_string (wm->ditem,
+ MATE_DESKTOP_ITEM_NAME));
+
+ wm->config_exec = g_strdup (mate_desktop_item_get_string (wm->ditem,
+ "ConfigExec"));
+ wm->config_tryexec = g_strdup (mate_desktop_item_get_string (wm->ditem,
+ "ConfigTryExec"));
+ wm->session_managed = mate_desktop_item_get_boolean (wm->ditem,
+ "SessionManaged");
+
+ wm->module = g_strdup (mate_desktop_item_get_string (wm->ditem,
+ "X-MATE-WMSettingsModule"));
+
+ wm->identify_name = g_strdup (mate_desktop_item_get_string (wm->ditem,
+ "X-MATE-WMName"));
+
+ wm->is_user = is_user;
+
+ if (mate_desktop_item_get_string (wm->ditem, MATE_DESKTOP_ITEM_EXEC)) {
+ const char *tryexec;
+
+ tryexec = mate_desktop_item_get_string (wm->ditem, MATE_DESKTOP_ITEM_TRY_EXEC);
+
+ if (tryexec) {
+ path = g_find_program_in_path (tryexec);
+ wm->is_present = (path != NULL);
+ if (path)
+ g_free (path);
+ } else
+ wm->is_present = TRUE;
+ } else
+ wm->is_present = FALSE;
+
+ if (wm->config_exec) {
+ if (wm->config_tryexec) {
+ path = g_find_program_in_path (wm->config_tryexec);
+ wm->is_config_present = (path != NULL);
+ if (path)
+ g_free (path);
+ } else {
+ path = g_find_program_in_path (wm->config_exec);
+ wm->is_config_present = (path != NULL);
+ if (path)
+ g_free (path);
+ }
+ } else
+ wm->is_config_present = FALSE;
+
+ if (wm->name && wm->exec &&
+ (wm->is_user || wm->is_present))
+ return wm;
+ else {
+ wm_free (wm);
+ return NULL;
+ }
+}
+
+static void
+scan_wm_directory (gchar *directory, gboolean is_user)
+{
+ GList *tmp_list;
+ GList *files;
+
+ files = list_desktop_files_in_dir (directory);
+
+ tmp_list = files;
+ while (tmp_list) {
+ AvailableWindowManager *wm;
+
+ wm = wm_load (tmp_list->data, is_user);
+
+ if (wm != NULL)
+ available_wms = g_list_prepend (available_wms, wm);
+
+ tmp_list = tmp_list->next;
+ }
+
+ g_list_foreach (files, (GFunc) g_free, NULL);
+ g_list_free (files);
+}
+
+void
+mate_wm_manager_init (void)
+{
+ char *tempdir;
+
+ if (done_scan)
+ return;
+
+ done_scan = TRUE;
+
+ tempdir = g_build_filename (MATE_WM_PROPERTY_PATH, NULL);
+ scan_wm_directory (tempdir, FALSE);
+ g_free (tempdir);
+
+ tempdir = g_build_filename (g_get_home_dir(), ".mate2", "wm-properties", NULL);
+ scan_wm_directory (tempdir, TRUE);
+ g_free (tempdir);
+
+ available_wms = g_list_sort (available_wms,
+ wm_compare);
+}
+
+static AvailableWindowManager*
+get_current_wm (GdkScreen *screen)
+{
+ AvailableWindowManager *current_wm;
+ const char *name;
+ GList *tmp_list;
+
+ g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
+
+ name = gdk_x11_screen_get_window_manager_name (screen);
+
+ current_wm = NULL;
+
+ tmp_list = available_wms;
+ while (tmp_list != NULL) {
+ AvailableWindowManager *wm = tmp_list->data;
+
+ if (wm->identify_name &&
+ strcmp (wm->identify_name, name) == 0) {
+ current_wm = wm;
+ break;
+ }
+ tmp_list = tmp_list->next;
+ }
+
+ if (current_wm == NULL) {
+ /* Try with localized name, sort of crackrock
+ * back compat hack
+ */
+
+ tmp_list = available_wms;
+ while (tmp_list != NULL) {
+ AvailableWindowManager *wm = tmp_list->data;
+
+ if (strcmp (wm->name, name) == 0) {
+ current_wm = wm;
+ break;
+ }
+ tmp_list = tmp_list->next;
+ }
+ }
+
+ return current_wm;
+}
+
+MateWindowManager*
+mate_wm_manager_get_current (GdkScreen *screen)
+{
+ AvailableWindowManager *wm;
+
+ wm = get_current_wm (screen);
+
+ if (wm != NULL && wm->module != NULL)
+ /* may still return NULL here */
+ return (MateWindowManager*) mate_window_manager_new (wm->ditem);
+ else
+ return NULL;
+}
+
+gboolean
+mate_wm_manager_spawn_config_tool_for_current (GdkScreen *screen,
+ GError **error)
+{
+ AvailableWindowManager *wm;
+
+ wm = get_current_wm (screen);
+
+ if (wm != NULL && wm->config_exec != NULL) {
+ return g_spawn_command_line_async (wm->config_exec,
+ error);
+ } else {
+ const char *name;
+
+ name = gdk_x11_screen_get_window_manager_name (screen);
+
+ g_set_error (error,
+ G_SPAWN_ERROR,
+ G_SPAWN_ERROR_FAILED,
+ _("Window manager \"%s\" has not registered a configuration tool\n"),
+ name);
+ return FALSE;
+ }
+}
diff --git a/libwindow-settings/mate-wm-manager.h b/libwindow-settings/mate-wm-manager.h
new file mode 100644
index 00000000..5319390e
--- /dev/null
+++ b/libwindow-settings/mate-wm-manager.h
@@ -0,0 +1,16 @@
+#ifndef MATE_WINDOW_MANAGER_LIST_H
+#define MATE_WINDOW_MANAGER_LIST_H
+
+#include <gtk/gtk.h>
+
+#include "mate-window-manager.h"
+
+void mate_wm_manager_init (void);
+
+/* gets the currently active window manager */
+MateWindowManager *mate_wm_manager_get_current (GdkScreen *screen);
+
+gboolean mate_wm_manager_spawn_config_tool_for_current (GdkScreen *screen,
+ GError **error);
+
+#endif