;; -*- scheme -*-
; object definitions ...
+(define-object Layer
+ (in-module "Champlain")
+ (parent "ClutterGroup")
+ (c-name "ChamplainLayer")
+ (gtype-id "CHAMPLAIN_TYPE_LAYER")
+)
+
(define-object Marker
(in-module "Champlain")
(parent "ClutterGroup")
)
)
+(define-enum StateEnum
+ (in-module "Champlain")
+ (c-name "ChamplainStateEnum")
+ (gtype-id "CHAMPLAIN_TYPE_STATE_ENUM")
+ (values
+ '("none" "CHAMPLAIN_STATE_NONE")
+ '("init" "CHAMPLAIN_STATE_INIT")
+ '("loading" "CHAMPLAIN_STATE_LOADING")
+ '("done" "CHAMPLAIN_STATE_DONE")
+ )
+)
+
;; From champlain.h
;; From champlain-layer.h
+(define-function layer_get_type
+ (c-name "champlain_layer_get_type")
+ (return-type "GType")
+)
+
(define-function layer_new
(c-name "champlain_layer_new")
(is-constructor-of "ChamplainLayer")
(return-type "ChamplainLayer*")
- (parameters
- )
)
)
-
-;; From champlain-marshal.h
-
-
-
-;; From champlain-enum-types.h
-
-(define-function map_source_get_type
- (c-name "champlain_map_source_get_type")
- (return-type "GType")
-)
-
-(define-function scroll_mode_get_type
- (c-name "champlain_scroll_mode_get_type")
- (return-type "GType")
-)
-
-
orange = clutter.Color(0xf3, 0x94, 0x07, 0xbb)
white = clutter.Color(0xff, 0xff, 0xff, 0xff)
timeline = clutter.Timeline()
- #behaviour = clutter.Behaviour()
- alpha = clutter.Alpha()
marker = champlain.Marker()
bg = cluttercairo.CairoTexture(MARKER_SIZE, MARKER_SIZE)
timeline.set_duration(1000)
timeline.set_loop(True)
+
+ alpha = clutter.Alpha()
+ alpha.set_timeline(timeline)
+ alpha.set_func(clutter.sine_inc_func)
+
+ behaviour = clutter.BehaviourScale(0.5, 0.5, 2.0, 2.0)
#alpha = clutter_alpha_new_full (timeline, CLUTTER_ALPHA_SINE_INC, NULL, g_object_unref);
+ behaviour.set_alpha(alpha)
+ behaviour.apply(bg)
-#behaviour = clutter_behaviour_scale_new (alpha, 0.5, 0.5, 2.0, 2.0);
- # clutter_behaviour_apply (behaviour, bg);
-
- #behaviour = clutter_behaviour_opacity_new (alpha, 255, 0);
- #clutter_behaviour_apply (behaviour, bg);
+ behaviour = clutter.BehaviourOpacity(255, 0)
+ behaviour.set_alpha(alpha)
+ behaviour.apply(bg)
timeline.start()
actor.set_size(800, 600)
stage.add(actor)
- #layer = champlain.Layer()
- #layer.show()
- #actor.add_layer(layer)
+ layer = champlain.Layer()
+ layer.show()
+ actor.add_layer(layer)
marker = create_marker()
- actor.add(marker)
+ layer.add(marker)
# Finish initialising the map view
actor.set_property("zoom-level", 5)