[gtk-cffi-cvs] CVS gtk-cffi/gdk

CVS User rklochkov rklochkov at common-lisp.net
Sat Sep 10 16:26:10 UTC 2011


Update of /project/gtk-cffi/cvsroot/gtk-cffi/gdk
In directory tiger.common-lisp.net:/tmp/cvs-serv27495/gdk

Modified Files:
	event.lisp gdk-cffi.asd generics.lisp keys.lisp rectangle.lisp 
Log Message:
Some refactoring. Now we can use (show #(1 2 3)) or (show '(1 2 3)) to lookup
through the sequence in GTK list view



--- /project/gtk-cffi/cvsroot/gtk-cffi/gdk/event.lisp	2011/04/25 19:16:07	1.1.1.1
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gdk/event.lisp	2011/09/10 16:26:10	1.2
@@ -31,46 +31,20 @@
   :proximity-out
   :substructure
   :scroll
-  (:all #x3ffff))
+  (:all #x3ffffe))
 
 (defcenum event-type
   (:nothing -1)
-  :delete
-  :destroy
-  :expose
-  :motion-notify
-  :button-press
-  :button2-press
-  :button3-press
-  :button-release
-  :key-press
-  :key-release
-  :enter-notify
-  :leave-notify
-  :focus-change
-  :configure
-  :map
-  :unmap
-  :property-notify
-  :selection-clear
-  :selection-request
-  :selection-notify
-  :proximity-in
-  :proximity-out
-  :drag-enter
-  :drag-leave
-  :drag-motion
-  :drag-status
-  :drop-start
-  :drop-finished
-  :client-event
-  :visibility-notify
-  :no-expose
-  :scroll
-  :window-state
-  :setting
-  :owner-change
-  :grab-broken)
+  :delete :destroy :expose :motion-notify
+  :button-press :button2-press :button3-press :button-release
+  :key-press :key-release :enter-notify :leave-notify
+  :focus-change :configure :map :unmap :property-notify
+  :selection-clear :selection-request :selection-notify
+  :proximity-in :proximity-out
+  :drag-enter :drag-leave :drag-motion :drag-status 
+  :drop-start :drop-finished :client-event :visibility-notify
+  :no-expose :scroll :window-state :setting :owner-change 
+  :grab-broken :damage)
 
 (defcstruct event-any
   ""
@@ -84,24 +58,14 @@
   (window window)
   (send-event :int8)
   (time :uint32)
-  (state :uint)
-  (keyval :uint)
+  (state modifier-type)
+  (keyval key)
   (length :int)
   (string :string)
   (hardware-keycode :uint16)
   (group :uint8)
   (is_modifier :uint))
 
-(defbitfield modifier
-  :shift :lock :control
-  :mod1 :mod2 :mod3 :mod4 :mod5
-  :button1 :button2 :button3 :button4 :button5
-  (:super #x4000000)
-  :hyper :meta
-  (:release #x40000000)
-  (:modifier #x5c001fff))
-  
-
 (defcstruct event-button
   "GdkEventButton"
   (type event-type)
@@ -111,7 +75,7 @@
   (x :double)
   (y :double)
   (axes axes)
-  (state modifier)
+  (state modifier-type)
   (button :int)
   (device device)
   (x-root :double)
@@ -128,7 +92,7 @@
   (time :uint32)
   (x :double)
   (y :double)
-  (state modifier)
+  (state modifier-type)
   (direction scroll-direction)
   (device device)
   (x-root :double)
@@ -143,7 +107,7 @@
   (x :double)
   (y :double)
   (axes axes)
-  (state modifier)
+  (state modifier-type)
   (is-hint :int16)
   (device device)
   (x-root :double)
@@ -195,7 +159,7 @@
   (mode crossing-mode)
   (detail notify)
   (focus :boolean)
-  (state modifier))
+  (state modifier-type))
 
 (defcstruct event-focus
   ""
--- /project/gtk-cffi/cvsroot/gtk-cffi/gdk/gdk-cffi.asd	2011/08/28 10:31:30	1.3
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gdk/gdk-cffi.asd	2011/09/10 16:26:10	1.4
@@ -21,11 +21,11 @@
    (:file generics :depends-on (package))
    (:file rectangle :depends-on (loadlib generics))
    (:file screen :depends-on (loadlib generics))
-   (:file keys :depends-on (package))
+   (:file window :depends-on (loadlib generics))
+   (:file keys :depends-on (package window))
    (:file threads :depends-on (package))
-   (:file event :depends-on (loadlib generics))
+   (:file event :depends-on (loadlib generics window))
    (:file color :depends-on (loadlib generics))
-   (:file window :depends-on (loadlib generics))
    (:file gc :depends-on (loadlib generics))
    (:file visual :depends-on (loadlib generics))
    (:file image :depends-on (visual))
--- /project/gtk-cffi/cvsroot/gtk-cffi/gdk/generics.lisp	2011/04/25 19:16:07	1.1.1.1
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gdk/generics.lisp	2011/09/10 16:26:10	1.2
@@ -1,8 +1,8 @@
 (in-package :gdk-cffi)
 
 (defgeneric get-slot (event field))
-(defgeneric width (widget))
-(defgeneric height (widget))
+;(defgeneric width (widget))
+;(defgeneric height (widget))
 (defgeneric draw-pixbuf (drawable gc pixbuf
                                   &optional src-x src-y
                                   dst-x dst-y width height
--- /project/gtk-cffi/cvsroot/gtk-cffi/gdk/keys.lisp	2011/08/28 10:31:30	1.2
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gdk/keys.lisp	2011/09/10 16:26:10	1.3
@@ -1,13 +1,12 @@
 (in-package :gdk-cffi)
 
-;(defun key (val)
-;  (foreign-enum-value 'keys val))
-
-(defcfun gdk-keyval-from-name :uint (val :string))
-(defcfun gdk-keyval-name :string (val :uint))
-(defcfun gdk-keyval-to-unicode :uint32 (val :uint))
-(defcfun gdk-unicode-to-keyval :uint (val :uint32))
+(defcfun (keyval-from-name "gdk_keyval_from_name") :uint (val :string))
+(defcfun (keyval-name "gdk_keyval_name") :string (val :uint))
+(defcfun (keyval-to-unicode "gdk_keyval_to_unicode") :uint32 (val :uint))
+(defcfun (unicode-to-keyval "gdk_unicode_to_keyval") :uint (val :uint32))
 
+(defun key (value)
+  (keyval-from-name (string value)))
 
 (define-foreign-type key ()
   ()
@@ -17,1717 +16,57 @@
 (defmethod translate-to-foreign (value (key key))
   (typecase value
     (integer value)
-    (t (gdk-keyval-from-name (string value)))))
+    (t (key value))))
+
+(defclass keymap (g-object)
+  ())
 
-(defmethod translate-from-foreign (value (key key))
-  (make-keyword (gdk-keyval-name value)))
+(defcfun gdk-keymap-get-default :pointer)
+(defcfun gdk-keymap-get-for-display :pointer (display pobject))
 
-;; (defcenum keys
-;;   (:VoidSymbol #xffffff)
-;;   (:BackSpace #xff08)
-;;   (:Tab #xff09)
-;;   (:Linefeed #xff0a)
-;;   (:Clear #xff0b)
-;;   (:Return #xff0d)
-;;   (:Pause #xff13)
-;;   (:Scroll-Lock #xff14)
-;;   (:Sys-Req #xff15)
-;;   (:Escape #xff1b)
-;;   (:Delete #xffff)
-;;   (:Multi-key #xff20)
-;;   (:Codeinput #xff37)
-;;   (:SingleCandidate #xff3c)
-;;   (:MultipleCandidate #xff3d)
-;;   (:PreviousCandidate #xff3e)
-;;   (:Kanji #xff21)
-;;   (:Muhenkan #xff22)
-;;   (:Henkan-Mode #xff23)
-;;   (:Henkan #xff23)
-;;   (:Romaji #xff24)
-;;   (:Hiragana #xff25)
-;;   (:Katakana #xff26)
-;;   (:Hiragana-Katakana #xff27)
-;;   (:Zenkaku #xff28)
-;;   (:Hankaku #xff29)
-;;   (:Zenkaku-Hankaku #xff2a)
-;;   (:Touroku #xff2b)
-;;   (:Massyo #xff2c)
-;;   (:Kana-Lock #xff2d)
-;;   (:Kana-Shift #xff2e)
-;;   (:Eisu-Shift #xff2f)
-;;   (:Eisu-toggle #xff30)
-;;   (:Kanji-Bangou #xff37)
-;;   (:Zen-Koho #xff3d)
-;;   (:Mae-Koho #xff3e)
-;;   (:Home #xff50)
-;;   (:Left #xff51)
-;;   (:Up #xff52)
-;;   (:Right #xff53)
-;;   (:Down #xff54)
-;;   (:Prior #xff55)
-;;   (:Page-Up #xff55)
-;;   (:Next #xff56)
-;;   (:Page-Down #xff56)
-;;   (:End #xff57)
-;;   (:Begin #xff58)
-;;   (:Select #xff60)
-;;   (:Print #xff61)
-;;   (:Execute #xff62)
-;;   (:Insert #xff63)
-;;   (:Undo #xff65)
-;;   (:Redo #xff66)
-;;   (:Menu #xff67)
-;;   (:Find #xff68)
-;;   (:Cancel #xff69)
-;;   (:Help #xff6a)
-;;   (:Break #xff6b)
-;;   (:Mode-switch #xff7e)
-;;   (:script-switch #xff7e)
-;;   (:Num-Lock #xff7f)
-;;   (:KP-Space #xff80)
-;;   (:KP-Tab #xff89)
-;;   (:KP-Enter #xff8d)
-;;   (:KP-F1 #xff91)
-;;   (:KP-F2 #xff92)
-;;   (:KP-F3 #xff93)
-;;   (:KP-F4 #xff94)
-;;   (:KP-Home #xff95)
-;;   (:KP-Left #xff96)
-;;   (:KP-Up #xff97)
-;;   (:KP-Right #xff98)
-;;   (:KP-Down #xff99)
-;;   (:KP-Prior #xff9a)
-;;   (:KP-Page-Up #xff9a)
-;;   (:KP-Next #xff9b)
-;;   (:KP-Page-Down #xff9b)
-;;   (:KP-End #xff9c)
-;;   (:KP-Begin #xff9d)
-;;   (:KP-Insert #xff9e)
-;;   (:KP-Delete #xff9f)
-;;   (:KP-Equal #xffbd)
-;;   (:KP-Multiply #xffaa)
-;;   (:KP-Add #xffab)
-;;   (:KP-Separator #xffac)
-;;   (:KP-Subtract #xffad)
-;;   (:KP-Decimal #xffae)
-;;   (:KP-Divide #xffaf)
-;;   (:KP-0 #xffb0)
-;;   (:KP-1 #xffb1)
-;;   (:KP-2 #xffb2)
-;;   (:KP-3 #xffb3)
-;;   (:KP-4 #xffb4)
-;;   (:KP-5 #xffb5)
-;;   (:KP-6 #xffb6)
-;;   (:KP-7 #xffb7)
-;;   (:KP-8 #xffb8)
-;;   (:KP-9 #xffb9)
-;;   (:F1 #xffbe)
-;;   (:F2 #xffbf)
-;;   (:F3 #xffc0)
-;;   (:F4 #xffc1)
-;;   (:F5 #xffc2)
-;;   (:F6 #xffc3)
-;;   (:F7 #xffc4)
-;;   (:F8 #xffc5)
-;;   (:F9 #xffc6)
-;;   (:F10 #xffc7)
-;;   (:F11 #xffc8)
-;;   (:L1 #xffc8)
-;;   (:F12 #xffc9)
-;;   (:L2 #xffc9)
-;;   (:F13 #xffca)
-;;   (:L3 #xffca)
-;;   (:F14 #xffcb)
-;;   (:L4 #xffcb)
-;;   (:F15 #xffcc)
-;;   (:L5 #xffcc)
-;;   (:F16 #xffcd)
-;;   (:L6 #xffcd)
-;;   (:F17 #xffce)
-;;   (:L7 #xffce)
-;;   (:F18 #xffcf)
-;;   (:L8 #xffcf)
-;;   (:F19 #xffd0)
-;;   (:L9 #xffd0)
-;;   (:F20 #xffd1)
-;;   (:L10 #xffd1)
-;;   (:F21 #xffd2)
-;;   (:R1 #xffd2)
-;;   (:F22 #xffd3)
-;;   (:R2 #xffd3)
-;;   (:F23 #xffd4)
-;;   (:R3 #xffd4)
-;;   (:F24 #xffd5)
-;;   (:R4 #xffd5)
-;;   (:F25 #xffd6)
-;;   (:R5 #xffd6)
-;;   (:F26 #xffd7)
-;;   (:R6 #xffd7)
-;;   (:F27 #xffd8)
-;;   (:R7 #xffd8)
-;;   (:F28 #xffd9)
-;;   (:R8 #xffd9)
-;;   (:F29 #xffda)
-;;   (:R9 #xffda)
-;;   (:F30 #xffdb)
-;;   (:R10 #xffdb)
-;;   (:F31 #xffdc)
-;;   (:R11 #xffdc)
-;;   (:F32 #xffdd)
-;;   (:R12 #xffdd)
-;;   (:F33 #xffde)
-;;   (:R13 #xffde)
-;;   (:F34 #xffdf)
-;;   (:R14 #xffdf)
-;;   (:F35 #xffe0)
-;;   (:R15 #xffe0)
-;;   (:Shift-L #xffe1)
-;;   (:Shift-R #xffe2)
-;;   (:Control-L #xffe3)
-;;   (:Control-R #xffe4)
-;;   (:Caps-Lock #xffe5)
-;;   (:Shift-Lock #xffe6)
-;;   (:Meta-L #xffe7)
-;;   (:Meta-R #xffe8)
-;;   (:Alt-L #xffe9)
-;;   (:Alt-R #xffea)
-;;   (:Super-L #xffeb)
-;;   (:Super-R #xffec)
-;;   (:Hyper-L #xffed)
-;;   (:Hyper-R #xffee)
-;;   (:ISO-Lock #xfe01)
-;;   (:ISO-Level2-Latch #xfe02)
-;;   (:ISO-Level3-Shift #xfe03)
-;;   (:ISO-Level3-Latch #xfe04)
-;;   (:ISO-Level3-Lock #xfe05)
-;;   (:ISO-Group-Shift #xff7e)
-;;   (:ISO-Group-Latch #xfe06)
-;;   (:ISO-Group-Lock #xfe07)
-;;   (:ISO-Next-Group #xfe08)
-;;   (:ISO-Next-Group-Lock #xfe09)
-;;   (:ISO-Prev-Group #xfe0a)
-;;   (:ISO-Prev-Group-Lock #xfe0b)
-;;   (:ISO-First-Group #xfe0c)
-;;   (:ISO-First-Group-Lock #xfe0d)
-;;   (:ISO-Last-Group #xfe0e)
-;;   (:ISO-Last-Group-Lock #xfe0f)
-;;   (:ISO-Left-Tab #xfe20)
-;;   (:ISO-Move-Line-Up #xfe21)
-;;   (:ISO-Move-Line-Down #xfe22)
-;;   (:ISO-Partial-Line-Up #xfe23)
-;;   (:ISO-Partial-Line-Down #xfe24)
-;;   (:ISO-Partial-Space-Left #xfe25)
-;;   (:ISO-Partial-Space-Right #xfe26)
-;;   (:ISO-Set-Margin-Left #xfe27)
-;;   (:ISO-Set-Margin-Right #xfe28)
-;;   (:ISO-Release-Margin-Left #xfe29)
-;;   (:ISO-Release-Margin-Right #xfe2a)
-;;   (:ISO-Release-Both-Margins #xfe2b)
-;;   (:ISO-Fast-Cursor-Left #xfe2c)
-;;   (:ISO-Fast-Cursor-Right #xfe2d)
-;;   (:ISO-Fast-Cursor-Up #xfe2e)
-;;   (:ISO-Fast-Cursor-Down #xfe2f)
-;;   (:ISO-Continuous-Underline #xfe30)
-;;   (:ISO-Discontinuous-Underline #xfe31)
-;;   (:ISO-Emphasize #xfe32)
-;;   (:ISO-Center-Object #xfe33)
-;;   (:ISO-Enter #xfe34)
-;;   (:dead-grave #xfe50)
-;;   (:dead-acute #xfe51)
-;;   (:dead-circumflex #xfe52)
-;;   (:dead-tilde #xfe53)
-;;   (:dead-macron #xfe54)
-;;   (:dead-breve #xfe55)
-;;   (:dead-abovedot #xfe56)
-;;   (:dead-diaeresis #xfe57)
-;;   (:dead-abovering #xfe58)
-;;   (:dead-doubleacute #xfe59)
-;;   (:dead-caron #xfe5a)
-;;   (:dead-cedilla #xfe5b)
-;;   (:dead-ogonek #xfe5c)
-;;   (:dead-iota #xfe5d)
-;;   (:dead-voiced-sound #xfe5e)
-;;   (:dead-semivoiced-sound #xfe5f)
-;;   (:dead-belowdot #xfe60)
-;;   (:dead-hook #xfe61)
-;;   (:dead-horn #xfe62)
-;;   (:First-Virtual-Screen #xfed0)
-;;   (:Prev-Virtual-Screen #xfed1)
-;;   (:Next-Virtual-Screen #xfed2)
-;;   (:Last-Virtual-Screen #xfed4)
-;;   (:Terminate-Server #xfed5)
-;;   (:AccessX-Enable #xfe70)
-;;   (:AccessX-Feedback-Enable #xfe71)
-;;   (:RepeatKeys-Enable #xfe72)
-;;   (:SlowKeys-Enable #xfe73)
-;;   (:BounceKeys-Enable #xfe74)
-;;   (:StickyKeys-Enable #xfe75)
-;;   (:MouseKeys-Enable #xfe76)
-;;   (:MouseKeys-Accel-Enable #xfe77)
-;;   (:Overlay1-Enable #xfe78)
-;;   (:Overlay2-Enable #xfe79)
-;;   (:AudibleBell-Enable #xfe7a)
-;;   (:Pointer-Left #xfee0)
-;;   (:Pointer-Right #xfee1)
-;;   (:Pointer-Up #xfee2)
-;;   (:Pointer-Down #xfee3)
-;;   (:Pointer-UpLeft #xfee4)
-;;   (:Pointer-UpRight #xfee5)
-;;   (:Pointer-DownLeft #xfee6)
-;;   (:Pointer-DownRight #xfee7)
-;;   (:Pointer-Button-Dflt #xfee8)
-;;   (:Pointer-Button1 #xfee9)
-;;   (:Pointer-Button2 #xfeea)
-;;   (:Pointer-Button3 #xfeeb)
-;;   (:Pointer-Button4 #xfeec)
-;;   (:Pointer-Button5 #xfeed)
-;;   (:Pointer-DblClick-Dflt #xfeee)
-;;   (:Pointer-DblClick1 #xfeef)
-;;   (:Pointer-DblClick2 #xfef0)
-;;   (:Pointer-DblClick3 #xfef1)
-;;   (:Pointer-DblClick4 #xfef2)
-;;   (:Pointer-DblClick5 #xfef3)
-;;   (:Pointer-Drag-Dflt #xfef4)
-;;   (:Pointer-Drag1 #xfef5)
-;;   (:Pointer-Drag2 #xfef6)
-;;   (:Pointer-Drag3 #xfef7)
-;;   (:Pointer-Drag4 #xfef8)
-;;   (:Pointer-Drag5 #xfefd)
-;;   (:Pointer-EnableKeys #xfef9)
-;;   (:Pointer-Accelerate #xfefa)
-;;   (:Pointer-DfltBtnNext #xfefb)
-;;   (:Pointer-DfltBtnPrev #xfefc)
-;;   (:3270-Duplicate #xfd01)
-;;   (:3270-FieldMark #xfd02)
-;;   (:3270-Right2 #xfd03)
-;;   (:3270-Left2 #xfd04)
-;;   (:3270-BackTab #xfd05)
-;;   (:3270-EraseEOF #xfd06)
-;;   (:3270-EraseInput #xfd07)
-;;   (:3270-Reset #xfd08)
-;;   (:3270-Quit #xfd09)
-;;   (:3270-PA1 #xfd0a)
-;;   (:3270-PA2 #xfd0b)
-;;   (:3270-PA3 #xfd0c)
-;;   (:3270-Test #xfd0d)
-;;   (:3270-Attn #xfd0e)
-;;   (:3270-CursorBlink #xfd0f)
-;;   (:3270-AltCursor #xfd10)
-;;   (:3270-KeyClick #xfd11)
-;;   (:3270-Jump #xfd12)
-;;   (:3270-Ident #xfd13)
-;;   (:3270-Rule #xfd14)
-;;   (:3270-Copy #xfd15)
-;;   (:3270-Play #xfd16)
-;;   (:3270-Setup #xfd17)
-;;   (:3270-Record #xfd18)
-;;   (:3270-ChangeScreen #xfd19)
-;;   (:3270-DeleteWord #xfd1a)
-;;   (:3270-ExSelect #xfd1b)
-;;   (:3270-CursorSelect #xfd1c)
-;;   (:3270-PrintScreen #xfd1d)
-;;   (:3270-Enter #xfd1e)
-;;   (:space #x020)
-;;   (:exclam #x021)
-;;   (:quotedbl #x022)
-;;   (:numbersign #x023)
-;;   (:dollar #x024)
-;;   (:percent #x025)
-;;   (:ampersand #x026)
-;;   (:apostrophe #x027)
-;;   (:quoteright #x027)
-;;   (:parenleft #x028)
-;;   (:parenright #x029)
-;;   (:asterisk #x02a)
-;;   (:plus #x02b)
-;;   (:comma #x02c)
-;;   (:minus #x02d)
-;;   (:period #x02e)
-;;   (:slash #x02f)
-;;   (:0 #x030)
-;;   (:1 #x031)
-;;   (:2 #x032)
-;;   (:3 #x033)
-;;   (:4 #x034)
-;;   (:5 #x035)
-;;   (:6 #x036)
-;;   (:7 #x037)
-;;   (:8 #x038)
-;;   (:9 #x039)
-;;   (:colon #x03a)
-;;   (:semicolon #x03b)
-;;   (:less #x03c)
-;;   (:equal #x03d)
-;;   (:greater #x03e)
-;;   (:question #x03f)
-;;   (:at #x040)
-;;   (:caps-A #x041)
-;;   (:caps-B #x042)
-;;   (:caps-C #x043)
-;;   (:caps-D #x044)
-;;   (:caps-E #x045)
-;;   (:caps-F #x046)
-;;   (:caps-G #x047)
-;;   (:caps-H #x048)
-;;   (:caps-I #x049)
-;;   (:caps-J #x04a)
-;;   (:caps-K #x04b)
-;;   (:caps-L #x04c)
-;;   (:caps-M #x04d)
-;;   (:caps-N #x04e)
-;;   (:caps-O #x04f)
-;;   (:caps-P #x050)
-;;   (:caps-Q #x051)
-;;   (:caps-R #x052)
-;;   (:caps-S #x053)
-;;   (:caps-T #x054)
-;;   (:caps-U #x055)
-;;   (:caps-V #x056)
-;;   (:caps-W #x057)
-;;   (:caps-X #x058)

[1393 lines skipped]
--- /project/gtk-cffi/cvsroot/gtk-cffi/gdk/rectangle.lisp	2011/08/28 10:31:30	1.2
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gdk/rectangle.lisp	2011/09/10 16:26:10	1.3
@@ -12,6 +12,7 @@
   (src1 (struct rectangle)) (src2 (struct rectangle)) 
   (dest (struct rectangle :out t)))
 
+(defgeneric intersect (rect1 rect2))
 (defmethod intersect ((rect1 rectangle) (rect2 rectangle))
   "Returns new GdkRectangle: intersection of rect1 and rect2"
   (let ((dest (make-instance 'rectangle)))
@@ -22,6 +23,7 @@
   (src1 (struct rectangle)) (src2 (struct rectangle)) 
   (dest (struct rectangle :out t)))
 
+(defgeneric rectangle-union (rect1 rect2))
 (defmethod rectangle-union ((rect1 rectangle) (rect2 rectangle))
   (let ((dest (make-instance 'rectangle)))
     (gdk-rectangle-union rect1 rect2 dest)))





More information about the gtk-cffi-cvs mailing list