Function: x-dnd-xm-unpack-targets-table-header

x-dnd-xm-unpack-targets-table-header is a byte-compiled function defined in x-dnd.el.gz.

Signature

(x-dnd-xm-unpack-targets-table-header DATA)

Documentation

Decode the header of DATA, a Motif targets table.

Return a list of the following fields with the given types:

    Field name Type
  - BYTE_ORDER BYTE
  - PROTOCOL BYTE
  - TARGET_LIST_COUNT CARD16
  - TOTAL_DATA_SIZE CARD32

Source Code

;; Defined in /usr/src/emacs/lisp/x-dnd.el.gz
(defun x-dnd-xm-unpack-targets-table-header (data)
  "Decode the header of DATA, a Motif targets table.
Return a list of the following fields with the given types:

    Field name        Type
  - BYTE_ORDER        BYTE
  - PROTOCOL          BYTE
  - TARGET_LIST_COUNT CARD16
  - TOTAL_DATA_SIZE   CARD32"
  (let* ((byte-order (aref data 0))
         (protocol (aref data 1))
         (target-list-count (x-dnd-get-motif-value
                             data 2 2 byte-order))
         (total-data-size (x-dnd-get-motif-value
                           data 4 4 byte-order)))
    (list byte-order protocol target-list-count
          total-data-size)))