Created
December 14, 2010 06:13
-
-
Save higepon/740064 to your computer and use it in GitHub Desktop.
クラス名が文字列
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-class <window> () | |
(;; Pointer to the parent window. | |
(parent :init-keyword :parent :init-form *root-window*) | |
;; Sizes of the window | |
(width :init-keyword :width :init-value 1) | |
(height :init-keyword :height :init-value 1) | |
;; Position of the window relative to the parent. | |
(x :init-keyword :x :init-value 0) | |
(y :init-keyword :y :init-value 0) | |
)) | |
(define *screen-width* 1280) | |
(define *screen-height* 1024) | |
(define-macro (new class-name . args) | |
`(make ,(string->symbol class-name) ,@args)) | |
(display (new "<window>" :parent #f :width *screen-width* :height *screen-height*)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment