diff --git a/basis/compiler/cfg/instructions/instructions-docs.factor b/basis/compiler/cfg/instructions/instructions-docs.factor index 270790f0be..9df48d8989 100644 --- a/basis/compiler/cfg/instructions/instructions-docs.factor +++ b/basis/compiler/cfg/instructions/instructions-docs.factor @@ -9,10 +9,6 @@ HELP: ##alien-invoke { $class-description "An instruction for calling a function in a dynamically linked library. It has the following slots:" { $table - { - { $slot "gc-map" } - { "If the invoked c-function calls Factor code which triggers a gc, then a " { $link gc-map } " might be necessary." } - } { { $slot "reg-inputs" } { "Registers to use for the arguments to the function call. Each sequence item is a 3-tuple consisting of a " { $link spill-slot } ", register representation and a register." } @@ -25,10 +21,14 @@ HELP: ##alien-invoke { $slot "reg-outputs" } { "If the called function returns a value, then this slot is a one-element sequence containing a 3-tuple describing which register is used for the return value." } } + { + { $slot "gc-map" } + { "If the invoked C function calls Factor code which triggers a GC, then a " { $link gc-map } " is necessary to find the roots." } + } { { $slot "symbols" } { "Name of the function to call." } } - { { $slot "dll" } { "A dll handle." } } + { { $slot "dll" } { "A dll handle or " { $link f } "." } } } - "Which function arguments that goes in " { $slot "reg-inputs" } " and which goes in " { $slot "stack-inputs" } " depend on the calling convention. In " { $link cdecl } " on " { $link x86.32 } ", all arguments goes in " { $slot "stack-inputs" } " but on " { $link x86.64 } " the first six arguments are passed in registers and only then is the stack used." + "Which function arguments that goes in " { $slot "reg-inputs" } " and which goes in " { $slot "stack-inputs" } " depend on the calling convention. In " { $link cdecl } " on " { $link x86.32 } ", all arguments goes in " { $slot "stack-inputs" } ", in " { $link x86.64 } " the first six arguments are passed in registers and then stack parameters are used for the remainder." } { $see-also %alien-invoke } ; @@ -43,6 +43,11 @@ HELP: ##allot } } ; +HELP: ##box +{ $class-description + "This instruction boxes a value into a tagged pointer." +} { $see-also %box } ; + HELP: ##box-alien { $class-description "An instruction for boxing an alien value." @@ -220,10 +225,9 @@ HELP: ##set-slot-imm { { $slot "slot" } { "Slot index." } } { { $slot "tag" } { "Type tag for obj." } } } -} ; +} +{ $see-also ##set-slot %set-slot-imm } ; -{ ##set-slot %set-slot } related-words -{ ##set-slot-imm %set-slot-imm } related-words { ##set-slot-imm ##set-slot } related-words HELP: ##single>double-float diff --git a/basis/ui/gadgets/gadgets-docs.factor b/basis/ui/gadgets/gadgets-docs.factor index 96cf755f4f..34c17febb0 100644 --- a/basis/ui/gadgets/gadgets-docs.factor +++ b/basis/ui/gadgets/gadgets-docs.factor @@ -2,6 +2,10 @@ USING: accessors concurrency.flags help.markup help.syntax kernel math.rectangles models strings ui.gadgets.private ; IN: ui.gadgets +HELP: +{ $values { "gadget" "a new " { $link gadget } } } +{ $description "Creates a new gadget." } ; + HELP: control-value { $values { "control" gadget } { "value" object } } { $description "Outputs the value of the control's model." } ; @@ -10,15 +14,16 @@ HELP: gadget-child { $values { "gadget" gadget } { "child" gadget } } { $description "Outputs the first child of the gadget. Typically this word is used with gadgets which are known to have an only child." } ; +HELP: notify +{ $values { "gadget" gadget } } +{ $description "Notifies the gadget that it has a graft message to handle." } +{ $see-also graft* ungraft* } ; + HELP: nth-gadget { $values { "n" "a non-negative integer" } { "gadget" gadget } { "child" gadget } } { $description "Outputs the " { $snippet "n" } "th child of the gadget." } { $errors "Throws an error if " { $snippet "n" } " is negative or greater than or equal to the number of children." } ; -HELP: -{ $values { "gadget" "a new " { $link gadget } } } -{ $description "Creates a new gadget." } ; - HELP: relative-loc { $values { "fromgadget" gadget } { "togadget" gadget } { "loc" "a pair of integers" } } { $description @@ -145,10 +150,6 @@ HELP: add-gadgets { $notes "This may result in " { $link graft* } " being called on the children, if the parent is visible on the screen." } { $side-effects "parent" } ; -HELP: parents -{ $values { "gadget" gadget } { "seq" "a sequence of gadgets" } } -{ $description "Outputs a sequence of all parents of the gadget, with the first element being the gadget itself." } ; - HELP: child? { $values { "parent" gadget } { "child" gadget } { "?" boolean } } { $description "Tests if " { $snippet "child" } " is contained inside " { $snippet "parent" } "." } ; @@ -176,6 +177,10 @@ HELP: layout-later { $values { "gadget" gadget } } { $description "Adds the gadget to the " { $link layout-queue } " and notifies the UI thread that there is a gadget to layout. If the length of the queue is larger than " { $link layout-queue-limit } ", then the current thread is yielded so that the UI thread has a chance to run." } ; +HELP: parents +{ $values { "gadget" gadget } { "seq" "a sequence of gadgets" } } +{ $description "Outputs a sequence of all parents of the gadget, with the first element being the gadget itself." } ; + HELP: screen-loc { $values { "gadget" gadget } { "loc" "a pair of integers" } } { $description "Outputs the location of the gadget relative to the top-left corner of the world containing the gadget. This word does not output a useful value if the gadget is not grafted." } ; @@ -184,6 +189,10 @@ HELP: set-control-value { $values { "value" object } { "control" gadget } } { $description "Sets the value of the control's model." } ; +HELP: unqueue-graft +{ $values { "gadget" gadget } } +{ $description "Removes the gadget from the " { $link graft-queue } "." } ; + HELP: ui-notify-flag { $var-description "A " { $link flag } " raised to notify the UI thread that there is work to do." } { $see-also notify-ui-thread } ; @@ -196,4 +205,11 @@ $nl control-value set-control-value } +"Graft handling:" +{ $subsections + graft + notify + ungraft + unqueue-graft +} { $see-also "models" } ; diff --git a/basis/ui/gadgets/panes/panes-docs.factor b/basis/ui/gadgets/panes/panes-docs.factor index 6e9407137d..4be598c14a 100644 --- a/basis/ui/gadgets/panes/panes-docs.factor +++ b/basis/ui/gadgets/panes/panes-docs.factor @@ -3,7 +3,14 @@ ui.gadgets.panes.private ; IN: ui.gadgets.panes HELP: pane -{ $class-description "A pane " { $link gadget } " displays formatted text which is written to a " { $link pane-stream } " targetting the pane. Panes are created by calling " { $link } " or " { $link } "." } ; +{ $class-description "A pane " { $link gadget } " displays formatted text which is written to a " { $link pane-stream } " targetting the pane. Panes are created by calling " { $link } " or " { $link } ". Panes have the following slots" + { $table + { + { $slot "input" } + { "A gadget that receives input events and writes to the pane's input stream." } + } + } +} ; HELP: { $values { "pane" "a new " { $link pane } } }