Gjsify LogoGjsify Logo

Contains the public fields of a [Queue][glib-Double-ended-Queues].

record

Hierarchy

  • Queue

Index

Constructors

Properties

head: object[]

a pointer to the first element of the queue

field
length: number

the number of elements in the queue

field
tail: object[]

a pointer to the last element of the queue

field
name: string

Methods

  • clear(): void
  • Removes all the elements in queue. If queue elements contain dynamically-allocated memory, they should be freed first.

    Returns void

  • Convenience method, which frees all the memory used by a #GQueue, and calls the provided free_func on each item in the #GQueue.

    Parameters

    Returns void

  • free(): void
  • Frees the memory allocated for the #GQueue. Only call this function if queue was created with g_queue_new(). If queue elements contain dynamically-allocated memory, they should be freed first.

    If queue elements contain dynamically-allocated memory, you should either use g_queue_free_full() or free them manually first.

    Returns void

  • Convenience method, which frees all the memory used by a #GQueue, and calls the specified destroy function on every element's data.

    free_func should not modify the queue (eg, by removing the freed element from it).

    Parameters

    Returns void

  • getLength(): number
  • index(data: object): number
  • Returns the position of the first element in queue which contains data.

    Parameters

    • data: object

      the data to find

    Returns number

  • init(): void
  • A statically-allocated #GQueue must be initialized with this function before it can be used. Alternatively you can initialize it with %G_QUEUE_INIT. It is not necessary to initialize queues created with g_queue_new().

    Returns void

  • isEmpty(): boolean
  • peekHead(): object
  • peekNth(n: number): object
  • Returns the n'th element of queue.

    Parameters

    • n: number

      the position of the element

    Returns object

  • peekTail(): object
  • popHead(): object
  • Removes the first element of the queue and returns its data.

    Returns object

  • popNth(n: number): object
  • Removes the n'th element of queue and returns its data.

    Parameters

    • n: number

      the position of the element

    Returns object

  • popTail(): object
  • Removes the last element of the queue and returns its data.

    Returns object

  • pushHead(data: object): void
  • Adds a new element at the head of the queue.

    Parameters

    • data: object

      the data for the new element.

    Returns void

  • pushNth(data: object, n: number): void
  • Inserts a new element into queue at the given position.

    Parameters

    • data: object

      the data for the new element

    • n: number

      the position to insert the new element. If n is negative or larger than the number of elements in the queue, the element is added to the end of the queue.

    Returns void

  • pushTail(data: object): void
  • Adds a new element at the tail of the queue.

    Parameters

    • data: object

      the data for the new element

    Returns void

  • remove(data: object): boolean
  • Removes the first element in queue that contains data.

    Parameters

    • data: object

      the data to remove

    Returns boolean

  • removeAll(data: object): number
  • Remove all elements whose data equals data from queue.

    Parameters

    • data: object

      the data to remove

    Returns number

  • reverse(): void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method