[cluttermm] Add Clutter::Backend
- From: Siavash Safi <siavashs src gnome org>
- To: svn-commits-list gnome org
- Subject: [cluttermm] Add Clutter::Backend
- Date: Fri, 5 Jun 2009 03:02:53 -0400 (EDT)
commit 6623e7ae8c178c5e89e28ae83e5818ac795ae3ae
Author: Siavash Safi <siavash siavashs org>
Date: Thu Jun 4 19:33:28 2009 +0430
Add Clutter::Backend
---
.gitignore | 2 +
ChangeLog | 9 ++++
clutter/src/Makefile_list_of_hg.am_fragment | 1 +
clutter/src/backend.ccg | 24 +++++++++++
clutter/src/backend.hg | 59 +++++++++++++++++++++++++++
tools/m4/convert_cairomm.m4 | 3 +-
tools/m4/convert_cluttermm.m4 | 3 +
7 files changed, 100 insertions(+), 1 deletions(-)
diff --git a/.gitignore b/.gitignore
index f17d56c..bb0d3d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,6 +30,8 @@ clutter/cluttermm/alpha.cc
clutter/cluttermm/alpha.h
clutter/cluttermm/animation.cc
clutter/cluttermm/animation.h
+clutter/cluttermm/backend.h
+clutter/cluttermm/backend.cc
clutter/cluttermm/behaviour-depth.cc
clutter/cluttermm/behaviour-depth.h
clutter/cluttermm/behaviour-ellipse.cc
diff --git a/ChangeLog b/ChangeLog
index d8125f3..fcb3fd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2009-06-04 Siavash Safi <siavash siavashs org>
+ * .gitignore:
+ * clutter/src/Makefile_list_of_hg.am_fragment:
+ * clutter/src/backend.ccg:
+ * clutter/src/backend.hg: Add Clutter::Backend
+ * tools/m4/convert_cairomm.m4:
+ * tools/m4/convert_cluttermm.m4:
+
+2009-06-04 Siavash Safi <siavash siavashs org>
+
* clutter/src/clutter_docs.xml:
* clutter/src/clutter_enums.defs:
* clutter/src/clutter_methods.defs:
diff --git a/clutter/src/Makefile_list_of_hg.am_fragment b/clutter/src/Makefile_list_of_hg.am_fragment
index 8bd1386..cbb99e6 100644
--- a/clutter/src/Makefile_list_of_hg.am_fragment
+++ b/clutter/src/Makefile_list_of_hg.am_fragment
@@ -6,6 +6,7 @@ files_hg = \
actor.hg \
alpha.hg \
animation.hg \
+backend.hg \
behaviour.hg \
behaviour-depth.hg \
behaviour-ellipse.hg \
diff --git a/clutter/src/backend.ccg b/clutter/src/backend.ccg
new file mode 100644
index 0000000..3fffadf
--- /dev/null
+++ b/clutter/src/backend.ccg
@@ -0,0 +1,24 @@
+/* Copyright (C) 2009 The cluttermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <clutter/clutter.h>
+
+namespace Clutter
+{
+
+} //namespace Clutter
+
diff --git a/clutter/src/backend.hg b/clutter/src/backend.hg
new file mode 100644
index 0000000..0ea6a1c
--- /dev/null
+++ b/clutter/src/backend.hg
@@ -0,0 +1,59 @@
+/* Copyright (C) 2009 The cluttermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <cairomm/fontoptions.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Clutter
+{
+
+class Backend :
+ public Glib::Object
+{
+ _CLASS_GOBJECT(Backend, ClutterBackend, CLUTTER_BACKEND, Glib::Object, GObject)
+
+protected:
+ _CTOR_DEFAULT()
+
+public:
+ _WRAP_METHOD(static Glib::RefPtr<Backend> get_default(), clutter_get_default_backend, refreturn)
+
+ _WRAP_METHOD(double get_resolution() const, clutter_backend_get_resolution)
+ _WRAP_METHOD(void set_resolution(double dpi), clutter_backend_set_resolution)
+
+ _WRAP_METHOD(guint get_double_click_time() const, clutter_backend_get_double_click_time)
+ _WRAP_METHOD(void set_double_click_time(guint msec), clutter_backend_set_double_click_time)
+
+ _WRAP_METHOD(guint get_double_click_distance() const, clutter_backend_get_double_click_distance)
+ _WRAP_METHOD(void set_double_click_distance(guint distance), clutter_backend_set_double_click_distance)
+
+ _WRAP_METHOD(::Cairo::FontOptions get_font_options() const, clutter_backend_get_font_options)
+ _WRAP_METHOD(void set_font_options(const ::Cairo::FontOptions& options), clutter_backend_set_font_options)
+
+ _WRAP_METHOD(Glib::ustring get_font_name() const, clutter_backend_get_font_name)
+ _WRAP_METHOD(void set_font_name(const Glib::ustring& font_name), clutter_backend_set_font_name)
+
+ _WRAP_SIGNAL(void font_changed(), "font-changed")
+ _WRAP_SIGNAL(void resolution_changed(), "resolution-changed")
+};
+
+} // namespace Clutter
+
+//vim: ts=2,sw=2
diff --git a/tools/m4/convert_cairomm.m4 b/tools/m4/convert_cairomm.m4
index 30735b9..fb2ba9d 100644
--- a/tools/m4/convert_cairomm.m4
+++ b/tools/m4/convert_cairomm.m4
@@ -2,4 +2,5 @@ _CONVERSION(`const Glib::RefPtr<Cairo::Path>&',`const cairo_path_t*',`($3)->cobj
_CONVERSION(`Glib::RefPtr<Cairo::Context>&',`cairo_t*',`($3)->cobj()')
_CONVERSION(`Glib::RefPtr< ::Cairo::Context >&',`cairo_t*',`($3)->cobj()')
_CONVERSION(`cairo_t*',`Glib::RefPtr< ::Cairo::Context >',`$2(new ::Cairo::Context ($3, true))')
-
+_CONVERSION(`const cairo_font_options_t*',`::Cairo::FontOptions',`$2(const_cast<cairo_font_options_t*>($3), true)')
+_CONVERSION(`const ::Cairo::FontOptions&',`const cairo_font_options_t*',`($3).cobj()')
diff --git a/tools/m4/convert_cluttermm.m4 b/tools/m4/convert_cluttermm.m4
index 01074f0..ebee4db 100644
--- a/tools/m4/convert_cluttermm.m4
+++ b/tools/m4/convert_cluttermm.m4
@@ -22,6 +22,9 @@ _CONVERSION(`const Glib::RefPtr<Animation>&',`ClutterAnimation*',__CONVERT_REFPT
_CONVERSION(`ClutterAnimation*',`Glib::RefPtr<Animation>',`Glib::wrap($3)')
_CONVERSION(`ClutterAnimation*',`Glib::RefPtr<const Animation>',`Glib::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<Backend>&',`ClutterBackend*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`ClutterBackend*',`Glib::RefPtr<Backend>',`Glib::wrap($3)')
+
_CONVERSION(`const Glib::RefPtr<Interval>&',`ClutterInterval*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`ClutterInterval*',`Glib::RefPtr<Interval>',`Glib::wrap($3)')
_CONVERSION(`ClutterInterval*',`Glib::RefPtr<const Interval>',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]