chiark / gitweb /
Added ALLOCATE-FOREIGN method
authorespen <espen>
Thu, 9 Feb 2006 22:32:47 +0000 (22:32 +0000)
committerespen <espen>
Thu, 9 Feb 2006 22:32:47 +0000 (22:32 +0000)
gtk/gtk.lisp
gtk/gtkselection.lisp
gtk/gtktree.lisp
rsvg/rsvg.lisp

index 63d4f541e9e55a742d1563e60fd25812d1606c32..05f6c8a68ee273bc9eed56c1814ba599aa58b837 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gtk.lisp,v 1.51 2006-02-08 22:21:07 espen Exp $
+;; $Id: gtk.lisp,v 1.52 2006-02-09 22:32:47 espen Exp $
 
 
 (in-package "GTK")
 
 
 (in-package "GTK")
@@ -1091,13 +1091,14 @@ (defbinding menu-tool-button-set-arrow-tooltip () nil
 
 ;;; Message dialog
 
 
 ;;; Message dialog
 
-(defmethod initialize-instance ((dialog message-dialog)
-                               &key (message-type :info) (buttons :close)
-                               flags text #+gtk 2.6 secondary-text 
-                               transient-parent)
-  (setf 
-   (foreign-location dialog)
-   (%message-dialog-new transient-parent flags message-type buttons))
+(defmethod allocate-foreign ((dialog message-dialog) &key (message-type :info)
+                            (buttons :close) flags transient-parent)
+  (%message-dialog-new transient-parent flags message-type buttons))
+
+
+(defmethod shared-initialize ((dialog message-dialog) names
+                             &key text #+gtk 2.6 secondary-text)
+  (declare (ignore names))
   (when text
     (message-dialog-set-markup dialog text))
   #+gtk2.6
   (when text
     (message-dialog-set-markup dialog text))
   #+gtk2.6
index 9fa169e9d60bbec5d1e17dcde742aac57545b0d8..3c0eee2dc865eb63016d4d8ff843ad05ea87efd9 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gtkselection.lisp,v 1.4 2006-02-08 22:21:07 espen Exp $
+;; $Id: gtkselection.lisp,v 1.5 2006-02-09 22:32:47 espen Exp $
 
 
 (in-package "GTK")
 
 
 (in-package "GTK")
@@ -46,9 +46,8 @@ (defbinding %target-list-new () pointer
   (targets (vector (inlined target-entry)))
   ((length targets) int))
   
   (targets (vector (inlined target-entry)))
   ((length targets) int))
   
-(defmethod initialize-instance ((target-list target-list) &key targets)
-  (setf (foreign-location target-list) (%target-list-new targets))
-  (call-next-method))
+(defmethod allocate-foreign ((target-list target-list) &key targets)
+  (%target-list-new targets))
 
 (defbinding target-list-add (target-list target &optional flags info) nil
   (target-list target-list)
 
 (defbinding target-list-add (target-list target &optional flags info) nil
   (target-list target-list)
index 9b408f5f1c4abf6b17f7f91bca413f2e9d166a03..81c68964c6bf38bf083e7210c227e050e54445b2 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gtktree.lisp,v 1.13 2006-02-08 22:21:07 espen Exp $
+;; $Id: gtktree.lisp,v 1.14 2006-02-09 22:32:47 espen Exp $
 
 
 (in-package "GTK")
 
 
 (in-package "GTK")
@@ -291,11 +291,8 @@ (defbinding %tree-row-reference-new () pointer
   (model tree-model)
   (path tree-path))
 
   (model tree-model)
   (path tree-path))
 
-(defmethod initialize-instance ((reference tree-row-reference) &key model path)
-  (setf
-   (foreign-location reference)
-   (%tree-row-reference-new model path))
-  (call-next-method))
+(defmethod allocate-foreign ((reference tree-row-reference) &key model path)
+  (%tree-row-reference-new model path))
 
 (defbinding tree-row-reference-get-path () tree-path
   (reference tree-row-reference))
 
 (defbinding tree-row-reference-get-path () tree-path
   (reference tree-row-reference))
index 489ef4cfe6d41bebfbb84c37d87a6f45099316e2..c2d5872fea0f1787ab484e07bf5c06dc91b3c5d3 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: rsvg.lisp,v 1.2 2006-02-08 22:21:26 espen Exp $
+;; $Id: rsvg.lisp,v 1.3 2006-02-09 22:33:13 espen Exp $
 
 (in-package "RSVG")
 
 
 (in-package "RSVG")
 
@@ -111,15 +111,14 @@ (defbinding %handle-new-from-file () pointer
   (filename pathname)
   (nil gerror :out))
 
   (filename pathname)
   (nil gerror :out))
 
-(defmethod initialize-instance ((handle handle) &key filename)
+(defmethod allocate-foreign ((handle handle) &key filename)
   (multiple-value-bind (location gerror)
       (cond 
        (filename (%handle-new-from-file filename))
        (t (%handle-new)))
     (if gerror 
        (signal-gerror gerror)
   (multiple-value-bind (location gerror)
       (cond 
        (filename (%handle-new-from-file filename))
        (t (%handle-new)))
     (if gerror 
        (signal-gerror gerror)
-      (setf (foreign-location handle) location)))
-  (call-next-method))
+      location)))
 
 
 (defbinding %handle-free () nil
 
 
 (defbinding %handle-free () nil