;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-;; $Id: gtkwidget.lisp,v 1.1 2000/08/14 16:45:02 espen Exp $
+;; $Id: gtkwidget.lisp,v 1.3 2000/10/05 17:34:53 espen Exp $
(in-package "GTK")
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (defclass widget (object)
- ((child-slots
- :allocation :instance
- :accessor widget-child-slots
- :type container-child)
- (name
- :allocation :arg
- :accessor widget-name
- :initarg :name
- :type string)
- (parent
- :allocation :arg
- :accessor widget-parent
-; :initarg :parent
- :type container)
- (x
- :allocation :arg
- :accessor widget-x-position
- :initarg :x
- :type int)
- (y
- :allocation :arg
- :accessor widget-y-position
- :initarg :y
- :type int)
- (width
- :allocation :arg
- :accessor widget-width
- :initarg :width
- :type int)
- (height
- :allocation :arg
- :accessor widget-height
- :initarg :height
- :type int)
- (visible
- :allocation :arg
- :accessor widget-visible-p
- :initarg :visible
- :type boolean)
- (sensitive
- :allocation :arg
- :accessor widget-sensitive-p
- :initarg :sensitive
- :type boolean)
- (app-paintable
- :allocation :arg
- :reader widget-app-paintable-p
-; :access :read-only
- :type boolean)
- (can-focus
- :allocation :arg
- :accessor widget-can-focus-p
- :initarg :can-focus
- :type boolean)
- (has-focus
- :allocation :arg
- :accessor widget-has-focus-p
- :initarg :has-focus
- :type boolean)
- (can-default
- :allocation :arg
- :accessor widget-can-default-p
- :initarg :can-default
- :type boolean)
- (has-default
- :allocation :arg
- :accessor widget-has-default-p
- :initarg :has-default
- :type boolean)
- (receives-default
- :allocation :arg
- :accessor widget-receives-default-p
- :initarg :receives-default
- :type boolean)
- (composite-child
- :allocation :arg
- :accessor widget-composite-child-p
- :initarg :composite-child
- :type boolean)
-; (style
-; :allocation :arg
-; :accessor widget-style
-; :initarg :style
-; :type style)
- (events
- :allocation :arg
- :accessor widget-events
- :initarg :events
- :type gdk:event-mask)
- (extension-events
- :allocation :arg
- :accessor widget-extension-events
- :initarg :extpension-events
- :type gdk:event-mask)
- (state
- :allocation :virtual
- :location ("gtk_widget_get_state" "gtk_widget_set_state")
- :accessor widget-state
- :initarg :state
- :type state-type)
- (window
- :allocation :virtual
- :location "gtk_widget_get_window"
- :reader widget-window
- :type gdk:window)
- (colormap
- :allocation :virtual
- :location "gtk_widget_get_colormap"
- :reader widget-colormap
- :type gdk:colormap)
- (visual
- :allocation :virtual
- :location "gtk_widget_get_visual"
- :reader widget-visual
- :type gdk:visual))
- (:metaclass object-class)
- (:alien-name "GtkWidget")))
-
-
(defmethod initialize-instance ((widget widget) &rest initargs &key parent)
(declare (ignore initargs))
(cond
(widget widget)
(event gdk:event))
+(define-foreign get-event-widget () widget
+ (event gdk:event))
+
(define-foreign widget-activate () boolean
(widget widget))
(define-foreign widget-grab-default () nil
(widget widget))
-;; cl-gtk.c
+(define-foreign grab-add () nil
+ (widget widget))
+
+(define-foreign grab-get-current () widget)
+
+(define-foreign grab-remove () nil
+ (widget widget))
+
(define-foreign widget-allocation () nil
(widget widget)
(width int :out)
(x-offset int)
(y-offset int))
-;; cl-gtk.c
+;; defined in gtkglue.c
(define-foreign widget-mapped-p () boolean
(widget widget))