[cheese] Removed mx dependency. Bumped minimum clutter version to 1.4.0
- From: Yuvaraj Pandian <yuvipanda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] Removed mx dependency. Bumped minimum clutter version to 1.4.0
- Date: Wed, 3 Nov 2010 08:54:37 +0000 (UTC)
commit 47ca90c3460a10b4a4b00dd5769b9641653e4b1c
Author: Yuvaraj Pandian T <yuvipanda gmail com>
Date: Wed Nov 3 14:24:26 2010 +0530
Removed mx dependency. Bumped minimum clutter version to 1.4.0
configure.ac | 4 +--
src/Makefile.am | 4 +-
src/cheese-window.vala | 24 ++++++++++----------
src/vapi/clutter-tablelayout.vapi | 45 +++++++++++++++++++++++++++++++++++++
4 files changed, 60 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d3785f7..9be76cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,12 +88,11 @@ DBUS_REQUIRED=1.0
DBUS_GLIB_REQUIRED=0.7
PANGOCAIRO_REQUIRED=1.18.0
LIBRSVG_REQUIRED=2.18.0
-CLUTTER_REQUIRED=1.0
+CLUTTER_REQUIRED=1.4
CLUTTERGTK_REQUIRED=0.10
CLUTTERGST_REQUIRED=1.0
UNIQUE_REQUIRED=1.1
GEE_REQUIRED=0.5
-MX_REQUIRED=1.0
LIBCANBERRA_REQUIRED=0.23
#*******************************************************************************
@@ -154,7 +153,6 @@ PKG_CHECK_MODULES(CHEESE, \
clutter-gst-1.0 >= $CLUTTERGST_REQUIRED \
unique-1.0 >= $UNIQUE_REQUIRED \
gee-1.0 >= $GEE_REQUIRED \
- mx-1.0 >= $MX_REQUIRED \
libcanberra-gtk >= $LIBCANBERRA_REQUIRED \
$UDEV_PKG \
gnome-video-effects
diff --git a/src/Makefile.am b/src/Makefile.am
index 6d55447..3d1c95b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,12 +10,12 @@ VALAFLAGS = \
--pkg gconf-2.0 \
--pkg gstreamer-0.10 \
--pkg unique-1.0 \
- --pkg mx-1.0 \
--pkg libcanberra \
--pkg libcanberra-gtk \
--pkg eogthumbnav \
--pkg cheese-thumbview \
- --pkg cheese-common
+ --pkg cheese-common \
+ --pkg clutter-tablelayout
AM_CPPFLAGS = \
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index 8f32207..25872c5 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -26,7 +26,6 @@ using Clutter;
using Config;
using Eog;
using Gst;
-using Mx;
using Gee;
using CanberraGtk;
@@ -68,9 +67,9 @@ public class Cheese.MainWindow : Gtk.Window
private Clutter.Rectangle background_layer;
private Clutter.Text error_layer;
- private Mx.Table current_effects_grid;
+ private Clutter.Box current_effects_grid;
private int current_effects_page = 0;
- private ArrayList<Mx.Table> effects_grids;
+ private ArrayList<Clutter.Box> effects_grids;
private Gtk.Action take_photo_action;
private Gtk.Action take_video_action;
@@ -851,7 +850,7 @@ public class Cheese.MainWindow : Gtk.Window
effects_manager = new EffectsManager ();
effects_manager.load_effects ();
- effects_grids = new ArrayList<Mx.Table>();
+ effects_grids = new ArrayList<Clutter.Box>();
if (effects_manager.effects.size == 0)
{
@@ -860,11 +859,12 @@ public class Cheese.MainWindow : Gtk.Window
for (int i = 0; i <= effects_manager.effects.size / EFFECTS_PER_PAGE; i++)
{
- Mx.Table grid = new Mx.Table ();
+ Clutter.TableLayout table_layout = new TableLayout();
+ Clutter.Box grid = new Clutter.Box (table_layout);
effects_grids.add (grid);
- grid.column_spacing = 20;
- grid.row_spacing = 20;
+ table_layout.column_spacing = 20;
+ table_layout.row_spacing = 20;
}
for (int i = 0; i < effects_manager.effects.size; i++)
@@ -907,11 +907,11 @@ public class Cheese.MainWindow : Gtk.Window
"y-align", Clutter.BinAlignment.END, null
);
- effects_grids[i / EFFECTS_PER_PAGE].add_actor_with_properties ((Clutter.Actor)box,
- (i % EFFECTS_PER_PAGE) % 3,
- (i % EFFECTS_PER_PAGE) / 3,
- "x-fill", true,
- "y-fill", true
+ Clutter.TableLayout table_layout = (Clutter.TableLayout)effects_grids[i / EFFECTS_PER_PAGE].layout_manager;
+ table_layout.pack (
+ (Clutter.Actor)box,
+ (i % EFFECTS_PER_PAGE) % 3,
+ (i % EFFECTS_PER_PAGE) / 3
);
}
diff --git a/src/vapi/clutter-tablelayout.vapi b/src/vapi/clutter-tablelayout.vapi
new file mode 100644
index 0000000..70e4079
--- /dev/null
+++ b/src/vapi/clutter-tablelayout.vapi
@@ -0,0 +1,45 @@
+using Clutter;
+
+[CCode (cprefix = "Clutter", lower_case_cprefix = "clutter_", gir_namespace = "Clutter", gir_version = "1.0")]
+namespace Clutter {
+
+
+ [CCode (cprefix = "CLUTTER_TABLE_ALIGNMENT_", cheader_filename = "clutter/clutter.h")]
+ public enum TableAlignment {
+ START,
+ CENTER,
+ END
+ }
+
+ [CCode (cheader_filename = "clutter/clutter.h")]
+ public class TableLayout : Clutter.LayoutManager {
+ [CCode (type = "ClutterLayoutManager*", has_construct_function = false)]
+ public TableLayout ();
+ public void get_alignment (Clutter.Actor actor, Clutter.TableAlignment x_align, Clutter.TableAlignment y_align);
+ public int get_column_count ();
+ public uint get_column_spacing ();
+ public uint get_easing_duration ();
+ public ulong get_easing_mode ();
+ public void get_expand (Clutter.Actor actor, bool x_expand, bool y_expand);
+ public void get_fill (Clutter.Actor actor, bool x_fill, bool y_fill);
+ public int get_row_count ();
+ public uint get_row_spacing ();
+ public void get_span (Clutter.Actor actor, int column_span, int row_span);
+ public bool get_use_animations ();
+ public void pack (Clutter.Actor actor, int column, int row);
+ public void set_alignment (Clutter.Actor actor, Clutter.TableAlignment x_align, Clutter.TableAlignment y_align);
+ public void set_column_spacing (uint spacing);
+ public void set_easing_duration (uint msecs);
+ public void set_easing_mode (ulong mode);
+ public void set_expand (Clutter.Actor actor, bool x_expand, bool y_expand);
+ public void set_fill (Clutter.Actor actor, bool x_fill, bool y_fill);
+ public void set_row_spacing (uint spacing);
+ public void set_span (Clutter.Actor actor, int column_span, int row_span);
+ public void set_use_animations (bool animate);
+ public uint column_spacing { get; set; }
+ public uint easing_duration { get; set; }
+ public ulong easing_mode { get; set; }
+ public uint row_spacing { get; set; }
+ public bool use_animations { get; set; }
+ }
+}
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]