All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

apply-in-pane-process Function

Summary

Applies a function in the process associated with a pane.

Package

capi

Signature

apply-in-pane-process pane function &rest args => nil

Arguments
pane
function
A function designator.
args
Lisp objects.
Description

The function apply-in-pane-process applies function to args in the process that is associated with pane. This is required when function modifies pane or changes how it is displayed. If pane has not been displayed yet, then function is called immediately.

Notes
  1. All accesses (reads as well as writes) on a pane should be performed in the pane's process. Within a callback on the pane's interface this happens automatically, but apply-in-pane-process is a useful utility in other circumstances.
  2. apply-in-pane-process calls function on the current process if the pane's interface does not have a process.
  3. If the pane's process is no longer active then apply-in-pane-process applies function directly.
  4. apply-in-pane-process-if-alive is another way to call function in the CAPI process appropriate for pane. However it only does this if pane is alive so in particular, if pane does not have a process, it does not call function.
Examples

Editor commands must be called in the correct process:

(setq editor 
      (capi:contain
       (make-instance 'capi:editor-pane
                      :text "Once upon a time...")))
(capi:apply-in-pane-process 
 editor 'capi:call-editor editor "End Of Buffer")
(capi:apply-in-pane-process 
 editor 'capi:call-editor editor "Beginning Of Buffer")
See also

apply-in-pane-process-if-alive
execute-with-interface
4.1 The correct thread for CAPI operations
7 Programming with CAPI Windows


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27