minor gtk+.defs format changes




hi all,

i'm merely mentioning this for completeness in case
someone else is writing a parser also (which i don't assume ;).
first, the domain-names are case insensitively used, and
second, i've made a few changes to the function definitions:

; FUNCTION-DEFINITION:
; (define-function DOMAIN-NAME OPERATION-SYMBOL METHOD [DESCRIPTION]
;   [RETURNS] [ARGUMENTS] )
;
; DESCRIPTION:
; (description [STRING...] )
; multiple STRINGs will get concatenated
;
; RETURNS:
; (returns TYPE)
;
; ARGUMENTS:
; (arguments [ARG...] )
;
; ARG:
; (ARG-TYPE TYPE ARG-NAME [DEFAULT-VALUE])
;
; ARG-TYPE:
; {arg-in|arg-out|arg-inout}
;
; DEFAULT-VALUE:
; this value depends on TYPE

function arguments can have default values now (marius used this
in his original gtk.defs)
the ARG-TYPE has changed from
{in|out|inout}
to
{arg-in|arg-out|arg-inout}
because `in' was used on some enum-value nice-names also.

so now the following function definitions are perfectly valid:

(define-function        gtk box pack-start
  (returns      none)
  (arguments
    (arg-in GtkBox      box)
    (arg-in GtkWidget   child)
    (arg-in bool        expand TRUE)
    (arg-in bool        fill TRUE)
    (arg-in int         padding 0)))

(define-function        gtk radio_button new_from_widget
  (returns      GtkWidget)
  (arguments
    (arg-in GtkRadioButton      group NULL)))

(define-function        gtk table attach
  (returns      none)
  (arguments
    (arg-in GtkTable            table)
    (arg-in GtkWidget           child)
    (arg-in int                 left_attach)
    (arg-in int                 right_attach)
    (arg-in int                 top_attach)
    (arg-in int                 bottom_attach)
    (arg-in GtkAttachOptions    xoptions expand | fill)
    (arg-in GtkAttachOptions    yoptions expand | fill)
    (arg-in int                 xpadding 0)
    (arg-in int                 ypadding 0)))

e.g. in case of GtkAttachOptions,
(arg-in GtkAttachOptions    yoptions expand | GTK_SHRINK)
is valid, whereas
(arg-in GtkAttachOptions    yoptions GTK_WIN_POS_NONE)
gives
gtk+new.defs:966: error: invalid identifier `GTK-WIN-POS-NONE', expected valid identifier


please continue to state your comments or correct typos etc...


---
ciaoTJ



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]