From ee05442e14c770a70c4ad941de2de00f5a211ee7 Mon Sep 17 00:00:00 2001
From: David PIROTTE
Date: Thu, 16 Oct 2014 17:03:30 -0300
Subject: [PATCH 5/6] removing example based upon deprecated functionality
* examples/hello-behaviours.scm: deleted. This example was written
based on , but , all
its subclasses and methods have been deprecated in 1.6. See the
"Migrating from ClutterBehavior" section of the reference manual for
further information.
---
examples/hello-behaviours.scm | 95 -------------------------------------------
1 file changed, 95 deletions(-)
delete mode 100755 examples/hello-behaviours.scm
diff --git a/examples/hello-behaviours.scm b/examples/hello-behaviours.scm
deleted file mode 100755
index 86d46ac..0000000
--- a/examples/hello-behaviours.scm
+++ /dev/null
@@ -1,95 +0,0 @@
-#! /bin/sh
-# -*- scheme -*-
-exec guile -e main -s $0 "$@"
-!#
-;; guile-gnome
-;; Copyright (C) 2008, 2012 Free Software Foundation, Inc.
-
-;; 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 of
-;; the License, 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, contact:
-;;
-;; Free Software Foundation Voice: +1-617-542-5942
-;; 59 Temple Place - Suite 330 Fax: +1-617-542-2652
-;; Boston, MA 02111-1307, USA address@hidden
-
-
-(use-modules (gnome-2)
- (srfi srfi-11)
- (oop goops)
- (gnome gobject)
- (gnome glib)
- (gnome clutter))
-
-(define *loop* (g-main-loop-new))
-(define *stage* #f)
-(define *color* '(#xff #xcc #xcc #xdd))
-
-(define (on-button-press stage event)
- (pk 'button-pressed! stage event)
- #t)
-
-(define (prep-stage)
- (set! *stage* (clutter-stage-get-default))
- (set-color *stage* (pk (clutter-color-from-string "DarkSlateGrey")))
- (set-size *stage* 800 600)
- (set-title *stage* "My First Clutter Application")
- (connect *stage* 'key-press-event
- (lambda (s e) (g-main-loop-quit *loop*) #t))
- (connect *stage* 'button-press-event on-button-press))
-
-(define (fold-pack w h . procs)
- (pk w h procs)
- (if (pair? procs)
- (let-values (((w h) ((car procs) w h)))
- (apply fold-pack w h (cdr procs)))))
-
-(define (show-message msg)
- (define (make-label sw sh)
- (let ((l (make
- #:font-name "Mono 22" #:text msg #:color *color*)))
- (let-values (((w h) (get-size l)))
- (pk w h)
- (set-position l (- sw w 50) (- sh h))
- (add-actor *stage* l)
- (values sw (- sh h)))))
-
- (define (make-cursor sw sh)
- (let* ((c (make
- #:color *color* #:width 20 #:height (pk (- (get-height *stage*) sh))
- #:x (- sw 50) #:y sh))
- (t (make
- #:duration 800 ; milliseconds
- #:loop #t))
- (b (make
- #:opacity-start #xdd #:opacity-end #x0
- #:alpha (let ((a (clutter-alpha-new)))
- (set-mode a 'linear)
- (set-timeline a t)
- a))))
- (add-actor *stage* c)
- ;; FIXME: apply is not being made into a generic!
- (clutter-behaviour-apply b c)
- (start t)
- (values sw sh)))
-
- (fold-pack (get-width *stage*) (get-height *stage*)
- make-label
- make-cursor))
-
-(define (main args)
- (let ((message (if (pair? (cdr args)) (cadr args) "Hello from Guile-Clutter!")))
- (prep-stage)
- (show-message message)
- (show-all *stage*)
- (g-main-loop-run *loop*)
- (exit 0)))
--
2.1.1