;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-;; $Id: gtkwidget.lisp,v 1.20 2006-02-26 15:24:46 espen Exp $
+;; $Id: gtkwidget.lisp,v 1.22 2006-04-25 20:19:32 espen Exp $
(in-package "GTK")
(state state-type)
(color gdk:color))
-(defbinding widget-modify-font () nil
+(defbinding widget-modify-font (widget font-desc) nil
(widget widget)
- (state state-type)
- (font-desc pango:font-description))
+ ((etypecase font-desc
+ (pango:font-description font-desc)
+ (string (pango:font-description-from-string font-desc)))
+ pango:font-description))
(defbinding widget-create-pango-context () pango:context
(widget widget))
(event gdk:event))
(defun (setf widget-cursor) (cursor-type widget)
- (let ((cursor (make-instance 'gdk:cursor :type cursor-type)))
- (gdk:window-set-cursor (widget-window widget) cursor)))
+ (warn "(SETF WIDGET-CURSOR) is deprecated, use WIDGET-SET-CURSOR instead")
+ (widget-set-cursor widget cursor-type))
+
+(defun widget-set-cursor (widget cursor &rest args)
+ (gdk:window-set-cursor (widget-window widget)
+ (apply #'gdk:ensure-cursor cursor args)))
(defbinding %widget-get-parent-window () gdk:window
(widget widget))