summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2007-07-29 14:33:54 +0200
committerGuillaume Seguin <guillaume@segu.in>2007-07-29 14:33:54 +0200
commit4281646fe194ec1dfe3f38f8946e53c763ce1a2e (patch)
treea966092b6bb28c196c4f823f9005be3ea3e9f34e
parent73aef48bf773c121b9de0a48af6c773fe4bb9b5c (diff)
downloadscreencasting-4281646fe194ec1dfe3f38f8946e53c763ce1a2e.tar.gz
screencasting-4281646fe194ec1dfe3f38f8946e53c763ce1a2e.tar.bz2
* Update to latest core
o Remove feature/deps from vTable o paintScreen -> paintOutput * Update Makefile * Add plugin.info * xml -> xml.in * Update metadata for i18n
-rw-r--r--plugin/Makefile275
-rw-r--r--plugin/plugin.info2
-rw-r--r--plugin/screencasting.c20
-rw-r--r--plugin/screencasting.xml.in (renamed from plugin/screencasting.xml)14
4 files changed, 227 insertions, 84 deletions
diff --git a/plugin/Makefile b/plugin/Makefile
index fcaf1a6..8b86b53 100644
--- a/plugin/Makefile
+++ b/plugin/Makefile
@@ -2,7 +2,7 @@
#
# Compiz plugin Makefile
#
-# Copyright : (C) 2006 by Dennis Kasprzyk
+# Copyright : (C) 2007 by Dennis Kasprzyk
# E-mail : onestone@deltatauchi.de
#
#
@@ -18,69 +18,86 @@
#
##
-## configuration
-
-#enter plugin name here
-PLUGIN = screencasting
-
-#enter dependencies here
-PKG_DEP =
+# plugin.info file contents
+#
+# PLUGIN = foo
+# PKG_DEP = pango
+# LDFLAGS_ADD = -lGLU
+# CFLAGS_ADD = -I/usr/include/foo
+#
-## end of configuration
+#load config file
+include plugin.info
-#enter beryl or compiz here
-TARGET = compiz
ifeq ($(BUILD_GLOBAL),true)
- DESTDIR = $(shell pkg-config --variable=libdir compiz)/compiz
- XMLDIR = $(shell pkg-config --variable=prefix compiz)/share/compiz
+ PREFIX = $(shell pkg-config --variable=prefix compiz)
+ CLIBDIR = $(shell pkg-config --variable=libdir compiz)
+ CINCDIR = $(shell pkg-config --variable=includedir compiz)
+ PKGDIR = $(CLIBDIR)/pkgconfig
+ DESTDIR = $(shell pkg-config --variable=libdir compiz)/compiz
+ XMLDIR = $(shell pkg-config --variable=prefix compiz)/share/compiz
else
- DESTDIR = $(HOME)/.$(TARGET)/plugins
- XMLDIR = $(HOME)/.$(TARGET)/metadata
+ DESTDIR = $(HOME)/.compiz/plugins
+ XMLDIR = $(HOME)/.compiz/metadata
endif
BUILDDIR = build
+ECHO = `which echo`
+
CC = gcc
LIBTOOL = libtool
INSTALL = install
-BCOP = `pkg-config --variable=bin bcop`
+BCOP = `pkg-config --variable=bin bcop`
+
+CFLAGS = -g -Wall `pkg-config --cflags $(PKG_DEP) compiz ` $(CFLAGS_ADD)
+LDFLAGS = `pkg-config --libs $(PKG_DEP) compiz ` $(LDFLAGS_ADD)
-CFLAGS = -g -Wall `pkg-config --cflags $(PKG_DEP) $(TARGET) `
-LDFLAGS = `pkg-config --libs $(PKG_DEP) $(TARGET) ` -pthread
+POFILEDIR = $(shell if [ -n "$(PODIR)" ]; then $(ECHO) $(PODIR); else $(ECHO) ./po;fi )
-is-bcop-target := $(shell if [ -e $(PLUGIN).xml ]; then cat $(PLUGIN).xml | grep "useBcop=\"true\"";fi )
+is-bcop-target := $(shell if [ -e $(PLUGIN).xml.in ]; then cat $(PLUGIN).xml.in | grep "useBcop=\"true\""; \
+ else if [ -e $(PLUGIN).xml ]; then cat $(PLUGIN).xml | grep "useBcop=\"true\""; fi; fi)
-bcop-target := $(shell if [ -n "$(is-bcop-target)" ]; then echo $(PLUGIN).xml; fi )
-bcop-target-src := $(shell if [ -n "$(is-bcop-target)" ]; then echo $(BUILDDIR)/$(PLUGIN)_options.c; fi )
-bcop-target-hdr := $(shell if [ -n "$(is-bcop-target)" ]; then echo $(BUILDDIR)/$(PLUGIN)_options.h; fi )
+trans-target := $(shell if [ -e $(PLUGIN).xml.in -o -e $(PLUGIN).xml ]; then $(ECHO) $(BUILDDIR)/$(PLUGIN).xml;fi )
-gen-schemas := $(shell if [ -e $(PLUGIN).xml ] && [ -n `pkg-config --variable=xsltdir compiz-gconf` ]; then echo true; fi )
-schema-target := $(shell if [ -n "$(gen-schemas)" ]; then echo $(PLUGIN).xml; fi )
-schema-output := $(shell if [ -n "$(gen-schemas)" ]; then echo $(BUILDDIR)/compiz-$(PLUGIN).schema; fi )
+bcop-target := $(shell if [ -n "$(is-bcop-target)" ]; then $(ECHO) $(BUILDDIR)/$(PLUGIN).xml; fi )
+bcop-target-src := $(shell if [ -n "$(is-bcop-target)" ]; then $(ECHO) $(BUILDDIR)/$(PLUGIN)_options.c; fi )
+bcop-target-hdr := $(shell if [ -n "$(is-bcop-target)" ]; then $(ECHO) $(BUILDDIR)/$(PLUGIN)_options.h; fi )
+
+gen-schemas := $(shell if [ -e $(PLUGIN).xml.in -o -e $(PLUGIN).xml -a -n "`pkg-config --variable=xsltdir compiz-gconf`" ]; then $(ECHO) true; fi )
+schema-target := $(shell if [ -n "$(gen-schemas)" ]; then $(ECHO) $(BUILDDIR)/$(PLUGIN).xml; fi )
+schema-output := $(shell if [ -n "$(gen-schemas)" ]; then $(ECHO) $(BUILDDIR)/compiz-$(PLUGIN).schema; fi )
+
+ifeq ($(BUILD_GLOBAL),true)
+ pkg-target := $(shell if [ -e compiz-$(PLUGIN).pc.in -a -n "$(PREFIX)" -a -d "$(PREFIX)" ]; then $(ECHO) "$(BUILDDIR)/compiz-$(PLUGIN).pc"; fi )
+ hdr-install-target := $(shell if [ -e compiz-$(PLUGIN).pc.in -a -n "$(PREFIX)" -a -d "$(PREFIX)" -a -e $(PLUGIN).h ]; then $(ECHO) "$(PLUGIN).h"; fi )
+endif
# find all the object files (including those from .moc.cpp files)
-c-objs := $(patsubst %.c,%.lo,$(shell find -name '*.c' 2> /dev/null | grep -v "$(BUILDDIR)/" | sed -e 's/^.\///'))
-c-objs := $(filter-out $(bcop-target-src:.c=.lo),$(c-objs))
+c-objs := $(patsubst %.c,%.lo,$(shell find -name '*.c' 2> /dev/null | grep -v "$(BUILDDIR)/" | sed -e 's/^.\///'))
+c-objs := $(filter-out $(bcop-target-src:.c=.lo),$(c-objs))
all-c-objs := $(addprefix $(BUILDDIR)/,$(c-objs))
all-c-objs += $(bcop-target-src:.c=.lo)
# system include path parameter, -isystem doesn't work on old gcc's
-inc-path-param = $(shell if [ -z "`gcc --version | head -n 1 | grep ' 3'`" ]; then echo "-isystem"; else echo "-I"; fi)
+inc-path-param = $(shell if [ -z "`gcc --version | head -n 1 | grep ' 3'`" ]; then $(ECHO) "-isystem"; else $(ECHO) "-I"; fi)
# default color settings
-color := $(shell if [ $$TERM = "dumb" ]; then echo "no"; else echo "yes"; fi)
+color := $(shell if [ $$TERM = "dumb" ]; then $(ECHO) "no"; else $(ECHO) "yes"; fi)
#
# Do it.
#
-.PHONY: $(BUILDDIR) build-dir bcop-build schema-creation c-build-objs c-link-plugin
+.PHONY: $(BUILDDIR) build-dir trans-target bcop-build pkg-creation schema-creation c-build-objs c-link-plugin
-all: $(BUILDDIR) build-dir bcop-build schema-creation c-build-objs c-link-plugin
+all: $(BUILDDIR) build-dir trans-target bcop-build pkg-creation schema-creation c-build-objs c-link-plugin
+
+trans-build: $(trans-target)
bcop-build: $(bcop-target-hdr) $(bcop-target-src)
@@ -90,6 +107,8 @@ c-build-objs: $(all-c-objs)
c-link-plugin: $(BUILDDIR)/lib$(PLUGIN).la
+pkg-creation: $(pkg-target)
+
#
# Create build directory
#
@@ -101,45 +120,94 @@ $(DESTDIR) :
@mkdir -p $(DESTDIR)
#
+# fallback if xml.in doesn't exists
+#
+$(BUILDDIR)/%.xml: %.xml
+ @cp $< $@
+
+#
+# Translating
+#
+$(BUILDDIR)/%.xml: %.xml.in
+ @if [ -d $(POFILEDIR) ]; then \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e -n "\033[0;1;5mtranslate \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \
+ else \
+ $(ECHO) "translate $< -> $@"; \
+ fi; \
+ intltool-merge -x -u $(POFILEDIR) $< $@ > /dev/null; \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e "\r\033[0mtranslate : \033[34m$< -> $@\033[0m"; \
+ fi; \
+ else \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e -n "\033[0;1;5mconvert \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \
+ else \
+ $(ECHO) "convert $< -> $@"; \
+ fi; \
+ cat $< | sed -e 's;<_;<;g' -e 's;</_;</;g' > $@; \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e "\r\033[0mconvert : \033[34m$< -> $@\033[0m"; \
+ fi; \
+ fi
+
+#
# BCOP'ing
-$(BUILDDIR)/%_options.h: %.xml
+$(BUILDDIR)/%_options.h: $(BUILDDIR)/%.xml
@if [ '$(color)' != 'no' ]; then \
- echo -e -n "\033[0;1;5mbcop'ing \033[0;1;37m: \033[0;32m$< \033[0;1;37m-> \033[0;31m$@\033[0m"; \
+ $(ECHO) -e -n "\033[0;1;5mbcop'ing \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \
else \
- echo "bcop'ing $< -> $@"; \
+ $(ECHO) "bcop'ing $< -> $@"; \
fi
@$(BCOP) --header=$@ $<
@if [ '$(color)' != 'no' ]; then \
- echo -e "\r\033[0mbcop'ing : \033[34m$< -> $@\033[0m"; \
+ $(ECHO) -e "\r\033[0mbcop'ing : \033[34m$< -> $@\033[0m"; \
fi
-$(BUILDDIR)/%_options.c: %.xml
+$(BUILDDIR)/%_options.c: $(BUILDDIR)/%.xml
@if [ '$(color)' != 'no' ]; then \
- echo -e -n "\033[0;1;5mbcop'ing \033[0;1;37m: \033[0;32m$< \033[0;1;37m-> \033[0;31m$@\033[0m"; \
+ $(ECHO) -e -n "\033[0;1;5mbcop'ing \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \
else \
- echo "bcop'ing $< -> $@"; \
+ $(ECHO) "bcop'ing $< -> $@"; \
fi
@$(BCOP) --source=$@ $<
@if [ '$(color)' != 'no' ]; then \
- echo -e "\r\033[0mbcop'ing : \033[34m$< -> $@\033[0m"; \
+ $(ECHO) -e "\r\033[0mbcop'ing : \033[34m$< -> $@\033[0m"; \
fi
#
# Schema generation
-$(BUILDDIR)/compiz-%.schema: %.xml
+$(BUILDDIR)/compiz-%.schema: $(BUILDDIR)/%.xml
@if [ '$(color)' != 'no' ]; then \
- echo -e -n "\033[0;1;5mschema \033[0;1;37m: \033[0;32m$< \033[0;1;37m-> \033[0;31m$@\033[0m"; \
+ $(ECHO) -e -n "\033[0;1;5mschema'ing\033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \
else \
- echo "schema'ing $< -> $@"; \
+ $(ECHO) "schema'ing $< -> $@"; \
fi
@xsltproc `pkg-config --variable=xsltdir compiz-gconf`/schemas.xslt $< > $@
@if [ '$(color)' != 'no' ]; then \
- echo -e "\r\033[0mschema : \033[34m$< -> $@\033[0m"; \
+ $(ECHO) -e "\r\033[0mschema : \033[34m$< -> $@\033[0m"; \
fi
+#
+# pkg config file generation
+$(BUILDDIR)/compiz-%.pc: compiz-%.pc.in
+ @if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e -n "\033[0;1;5mpkgconfig \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \
+ else \
+ $(ECHO) "pkgconfig $< -> $@"; \
+ fi
+ @COMPIZREQUIRES=`cat $(PKGDIR)/compiz.pc | grep Requires | sed -e 's;Requires: ;;g'`; \
+ COMPIZCFLAGS=`cat $(PKGDIR)/compiz.pc | grep Cflags | sed -e 's;Cflags: ;;g'`; \
+ sed -e 's;@prefix@;$(PREFIX);g' -e 's;\@libdir@;$(CLIBDIR);g' \
+ -e 's;@includedir@;$(CINCDIR);g' -e 's;\@VERSION@;0.0.1;g' \
+ -e "s;@COMPIZ_REQUIRES@;$$COMPIZREQUIRES;g" \
+ -e "s;@COMPIZ_CFLAGS@;$$COMPIZCFLAGS;g" $< > $@;
+ @if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e "\r\033[0mpkgconfig : \033[34m$< -> $@\033[0m"; \
+ fi
#
# Compiling
@@ -147,24 +215,24 @@ $(BUILDDIR)/compiz-%.schema: %.xml
$(BUILDDIR)/%.lo: %.c
@if [ '$(color)' != 'no' ]; then \
- echo -n -e "\033[0;1;5mcompiling \033[0;1;37m: \033[0;32m$< \033[0;1;37m-> \033[0;31m$@\033[0m"; \
+ $(ECHO) -n -e "\033[0;1;5mcompiling \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \
else \
- echo "compiling $< -> $@"; \
+ $(ECHO) "compiling $< -> $@"; \
fi
@$(LIBTOOL) --quiet --mode=compile $(CC) $(CFLAGS) -I$(BUILDDIR) -c -o $@ $<
@if [ '$(color)' != 'no' ]; then \
- echo -e "\r\033[0mcompiling : \033[34m$< -> $@\033[0m"; \
+ $(ECHO) -e "\r\033[0mcompiling : \033[34m$< -> $@\033[0m"; \
fi
$(BUILDDIR)/%.lo: $(BUILDDIR)/%.c
@if [ '$(color)' != 'no' ]; then \
- echo -n -e "\033[0;1;5mcompiling \033[0;1;37m: \033[0;32m$< \033[0;1;37m-> \033[0;31m$@\033[0m"; \
+ $(ECHO) -n -e "\033[0;1;5mcompiling \033[0m: \033[0;32m$< \033[0m-> \033[0;31m$@\033[0m"; \
else \
- echo "compiling $< -> $@"; \
+ $(ECHO) "compiling $< -> $@"; \
fi
@$(LIBTOOL) --quiet --mode=compile $(CC) $(CFLAGS) -I$(BUILDDIR) -c -o $@ $<
@if [ '$(color)' != 'no' ]; then \
- echo -e "\r\033[0mcompiling : \033[34m$< -> $@\033[0m"; \
+ $(ECHO) -e "\r\033[0mcompiling : \033[34m$< -> $@\033[0m"; \
fi
@@ -176,50 +244,127 @@ cxx-rpath-prefix := -Wl,-rpath,
$(BUILDDIR)/lib$(PLUGIN).la: $(addprefix $(BUILDDIR)/,$(c-objs))
@if [ '$(color)' != 'no' ]; then \
- echo -e -n "\033[0;1;5mlinking -> \033[0;31m$@\033[0m"; \
+ $(ECHO) -e -n "\033[0;1;5mlinking \033[0m: \033[0;31m$@\033[0m"; \
else \
- echo "linking -> $@"; \
+ $(ECHO) "linking : $@"; \
fi
@$(LIBTOOL) --quiet --mode=link $(CC) $(LDFLAGS) -rpath $(DESTDIR) -o $@ $(all-c-objs)
@if [ '$(color)' != 'no' ]; then \
- echo -e "\r\033[0mlinking -> \033[34m$@\033[0m"; \
+ $(ECHO) -e "\r\033[0mlinking : \033[34m$@\033[0m"; \
fi
clean:
- rm -rf $(BUILDDIR)
+ @if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e -n "\033[0;1;5mremoving \033[0m: \033[0;31m./$(BUILDDIR)\033[0m"; \
+ else \
+ $(ECHO) "removing : ./$(BUILDDIR)"; \
+ fi
+ @rm -rf $(BUILDDIR)
+ @if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e "\r\033[0mremoving : \033[34m./$(BUILDDIR)\033[0m"; \
+ fi
+
install: $(DESTDIR) all
@if [ '$(color)' != 'no' ]; then \
- echo -n -e "\033[0;1;5minstall \033[0;1;37m: \033[0;31m$(DESTDIR)/lib$(PLUGIN).so\033[0m"; \
+ $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(DESTDIR)/lib$(PLUGIN).so\033[0m"; \
else \
- echo "install : $(DESTDIR)/lib$(PLUGIN).so"; \
+ $(ECHO) "install : $(DESTDIR)/lib$(PLUGIN).so"; \
fi
@mkdir -p $(DESTDIR)
@$(INSTALL) $(BUILDDIR)/.libs/lib$(PLUGIN).so $(DESTDIR)/lib$(PLUGIN).so
@if [ '$(color)' != 'no' ]; then \
- echo -e "\r\033[0minstall : \033[34m$(DESTDIR)/lib$(PLUGIN).so\033[0m"; \
+ $(ECHO) -e "\r\033[0minstall : \033[34m$(DESTDIR)/lib$(PLUGIN).so\033[0m"; \
fi
- @if [ -e $(PLUGIN).xml ]; then \
+ @if [ -e $(BUILDDIR)/$(PLUGIN).xml ]; then \
if [ '$(color)' != 'no' ]; then \
- echo -n -e "\033[0;1;5minstall \033[0;1;37m: \033[0;31m$(XMLDIR)/$(PLUGIN).xml\033[0m"; \
+ $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(XMLDIR)/$(PLUGIN).xml\033[0m"; \
else \
- echo "install : $(XMLDIR)/$(PLUGIN).xml"; \
+ $(ECHO) "install : $(XMLDIR)/$(PLUGIN).xml"; \
fi; \
mkdir -p $(XMLDIR); \
- cp $(PLUGIN).xml $(XMLDIR)/$(PLUGIN).xml; \
+ cp $(BUILDDIR)/$(PLUGIN).xml $(XMLDIR)/$(PLUGIN).xml; \
if [ '$(color)' != 'no' ]; then \
- echo -e "\r\033[0minstall : \033[34m$(XMLDIR)/$(PLUGIN).xml\033[0m"; \
+ $(ECHO) -e "\r\033[0minstall : \033[34m$(XMLDIR)/$(PLUGIN).xml\033[0m"; \
fi; \
fi
- @if [ -e $(schema-output) ]; then \
+ @if [ -n "$(hdr-install-target)" ]; then \
if [ '$(color)' != 'no' ]; then \
- echo -n -e "\033[0;1;5minstall \033[0;1;37m: \033[0;31m$(schema-output)\033[0m"; \
+ $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(CINCDIR)/compiz/$(hdr-install-target)\033[0m"; \
else \
- echo "install : $(schema-output)"; \
+ $(ECHO) "install : $(CINCDIR)/compiz/$(hdr-install-target)"; \
+ fi; \
+ cp $(hdr-install-target) $(CINCDIR)/compiz/$(hdr-install-target); \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e "\r\033[0minstall : \033[34m$(CINCDIR)/compiz/$(hdr-install-target)\033[0m"; \
+ fi; \
+ fi
+ @if [ -n "$(pkg-target)" ]; then \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(PKGDIR)/compiz-$(PLUGIN).pc\033[0m"; \
+ else \
+ $(ECHO) "install : $(PKGDIR)/compiz-$(PLUGIN).pc"; \
+ fi; \
+ cp $(pkg-target) $(PKGDIR)/compiz-$(PLUGIN).pc; \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e "\r\033[0minstall : \033[34m$(PKGDIR)/compiz-$(PLUGIN).pc\033[0m"; \
+ fi; \
+ fi
+ @if [ -n "$(schema-output)" -a -e "$(schema-output)" ]; then \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -n -e "\033[0;1;5minstall \033[0m: \033[0;31m$(schema-output)\033[0m"; \
+ else \
+ $(ECHO) "install : $(schema-output)"; \
fi; \
gconftool-2 --install-schema-file=$(schema-output) > /dev/null; \
if [ '$(color)' != 'no' ]; then \
- echo -e "\r\033[0minstall : \033[34m$(schema-output)\033[0m"; \
+ $(ECHO) -e "\r\033[0minstall : \033[34m$(schema-output)\033[0m"; \
+ fi; \
+ fi
+
+uninstall:
+ @if [ -e $(DESTDIR)/lib$(PLUGIN).so ]; then \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -n -e "\033[0;1;5muninstall \033[0m: \033[0;31m$(DESTDIR)/lib$(PLUGIN).so\033[0m"; \
+ else \
+ $(ECHO) "uninstall : $(DESTDIR)/lib$(PLUGIN).so"; \
+ fi; \
+ rm -f $(DESTDIR)/lib$(PLUGIN).so; \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e "\r\033[0muninstall : \033[34m$(DESTDIR)/lib$(PLUGIN).so\033[0m"; \
+ fi; \
+ fi
+ @if [ -e $(XMLDIR)/$(PLUGIN).xml ]; then \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -n -e "\033[0;1;5muninstall \033[0m: \033[0;31m$(XMLDIR)/$(PLUGIN).xml\033[0m"; \
+ else \
+ $(ECHO) "uninstall : $(XMLDIR)/$(PLUGIN).xml"; \
+ fi; \
+ rm -f $(XMLDIR)/$(PLUGIN).xml; \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e "\r\033[0muninstall : \033[34m$(XMLDIR)/$(PLUGIN).xml\033[0m"; \
+ fi; \
+ fi
+ @if [ -n "$(hdr-install-target)" -a -e $(CINCDIR)/compiz/$(hdr-install-target) ]; then \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -n -e "\033[0;1;5muninstall \033[0m: \033[0;31m$(CINCDIR)/compiz/$(hdr-install-target)\033[0m"; \
+ else \
+ $(ECHO) "uninstall : $(CINCDIR)/compiz/$(hdr-install-target)"; \
+ fi; \
+ rm -f $(CINCDIR)/compiz/$(hdr-install-target); \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e "\r\033[0muninstall : \033[34m$(CINCDIR)/compiz/$(hdr-install-target)\033[0m"; \
+ fi; \
+ fi
+ @if [ -n "$(pkg-target)" -a -e $(PKGDIR)/compiz-$(PLUGIN).pc ]; then \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -n -e "\033[0;1;5muninstall \033[0m: \033[0;31m$(PKGDIR)/compiz-$(PLUGIN).pc\033[0m"; \
+ else \
+ $(ECHO) "uninstall : $(PKGDIR)/compiz-$(PLUGIN).pc"; \
+ fi; \
+ rm -f $(PKGDIR)/compiz-$(PLUGIN).pc; \
+ if [ '$(color)' != 'no' ]; then \
+ $(ECHO) -e "\r\033[0muninstall : \033[34m$(PKGDIR)/compiz-$(PLUGIN).pc\033[0m"; \
fi; \
fi
diff --git a/plugin/plugin.info b/plugin/plugin.info
new file mode 100644
index 0000000..459035b
--- /dev/null
+++ b/plugin/plugin.info
@@ -0,0 +1,2 @@
+PLUGIN = screencasting
+LDFLAGS_ADD = -pthread
diff --git a/plugin/screencasting.c b/plugin/screencasting.c
index 37f919f..6305d5b 100644
--- a/plugin/screencasting.c
+++ b/plugin/screencasting.c
@@ -65,7 +65,7 @@ typedef struct _CastDisplay {
} CastDisplay;
typedef struct _CastScreen {
- PaintScreenProc paintScreen;
+ PaintOutputProc paintOutput;
// DonePaintScreenProc donePaintScreen;
FrameQueue* frameQueue;
@@ -290,20 +290,20 @@ castDonePaintScreen (CompScreen *s)
(1000000 + (tv1)->tv_usec - (tv2)->tv_usec)) / 1000
static Bool
-castPaintScreen (CompScreen *s,
+castPaintOutput (CompScreen *s,
const ScreenPaintAttrib *sAttrib,
const CompTransform *transform,
Region region,
- int output,
+ CompOutput *output,
unsigned int mask)
{
Bool status;
CAST_SCREEN(s);
- UNWRAP (cs, s, paintScreen);
- status = (*s->paintScreen) (s, sAttrib, transform, region, output, mask);
- WRAP (cs, s, paintScreen, castPaintScreen);
+ UNWRAP (cs, s, paintOutput);
+ status = (*s->paintOutput) (s, sAttrib, transform, region, output, mask);
+ WRAP (cs, s, paintOutput, castPaintOutput);
/*if (cs->casting)
XUnionRegion(region, &emptyRegion, cs->damage);*/
@@ -471,7 +471,7 @@ castInitScreen (CompPlugin *p,
pthread_mutex_init(&cs->errorLock, NULL); // Create mutex for error locking.
- WRAP (cs, s, paintScreen, castPaintScreen);
+ WRAP (cs, s, paintOutput, castPaintOutput);
//WRAP (cs, s, donePaintScreen, castDonePaintScreen);
s->privates[cd->screenPrivateIndex].ptr = cs;
@@ -508,7 +508,7 @@ castFiniScreen (CompPlugin *p,
pthread_mutex_destroy(&cs->errorLock); // Destroy error locking mutex.
- UNWRAP (cs, s, paintScreen);
+ UNWRAP (cs, s, paintOutput);
//UNWRAP (cs, s, donePaintScreen);
free (cs);
@@ -572,10 +572,6 @@ static CompPluginVTable castVTable = {
castSetDisplayOption,
0, /* GetScreenOptions */
0, /* SetScreenOption */
- 0, /* Deps */
- 0, /* nDeps */
- 0, /* Features */
- 0 /* nFeatures */
};
CompPluginVTable *
diff --git a/plugin/screencasting.xml b/plugin/screencasting.xml.in
index cc366ca..07bb37a 100644
--- a/plugin/screencasting.xml
+++ b/plugin/screencasting.xml.in
@@ -1,22 +1,22 @@
<?xml version="1.0"?>
<compiz>
<plugin name="screencasting">
- <short>ScreenCasting</short>
- <long>ScreenCast plugin</long>
+ <_short>ScreenCasting</_short>
+ <_long>ScreenCast plugin</_long>
<display>
<option name="initiate" type="action">
- <short>Initiate</short>
- <long>Initiate screencasting</long>
+ <_short>Initiate</_short>
+ <_long>Initiate screencasting</_long>
<allowed key="true"/>
<default>
<key>&lt;Super&gt;F12</key>
</default>
</option>
<option name="directory" type="string">
- <short>Directory</short>
- <long>Put screenshot images in this directory</long>
+ <_short>Directory</_short>
+ <_long>Put screenshot images in this directory</_long>
<default>Desktop</default>
</option>
</display>
</plugin>
-</compiz> \ No newline at end of file
+</compiz>