JSDoc: Namespace: gui

# Namespace: gui

## jsxc. gui

Handle functions for chat window's and buddylist

Source:
  - jsxc.lib.gui.js, line 2

### Namespaces

dialog
queryActions
roster
window

### Members

#### <static> emotions

  Smilie token to file mapping
  Source:
    - jsxc.lib.gui.js, line 9

### Methods

#### <static> _unreadMsg(bid, count)

  Switch read state to UNread.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` |  |
  `count` |  |

  Source:
    - jsxc.lib.gui.js, line 1272

#### <static> changePresence(pres, external)

  Change own presence to pres.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `pres` | CONST.STATUS | New presence state
  `external` | boolean | True if triggered from other tab.

  Source:
    - jsxc.lib.gui.js, line 1188

#### <static> detectUriScheme(container)

  This function searches for URI scheme according to XEP-0147.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `container` |  | In which element should we search?

  Source:
    - jsxc.lib.gui.js, line 1325

#### <static> getWindow(bid) → {jquery}

  Returns the window element

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` | String |

  Deprecated:
    - Use jsxc.gui.window.get instead.
  Source:
    - jsxc.lib.gui.js, line 370

  ##### Returns:

  jQuery object of the window element
  Type
    jquery

#### <static> init()

  Creates application skeleton.
  Source:
    - jsxc.lib.gui.js, line 98

#### <static> readMsg(bid)

  Switch read state to read.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` |  |

  Source:
    - jsxc.lib.gui.js, line 1294

#### <static> scrollWindowListBy(offset)

  Scroll window list by offset.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `offset` |  |

  Source:
    - jsxc.lib.gui.js, line 340

#### <static> shortnameToImage(str) → {string}

  Replace shortname emoticons with images.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `str` | string | text with emoticons as shortname

  Source:
    - jsxc.lib.gui.js, line 1432

  ##### Returns:

  text with emoticons as images
  Type
    string

#### <static> showAboutDialog()

  Show about dialog.
  Source:
    - jsxc.lib.gui.js, line 812

#### <static> showAlert(msg) → {undefined}

  Create and show a wait dialog

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `msg` | type | message to display to the user

  Source:
    - jsxc.lib.gui.js, line 760

  ##### Returns:

  Type
    undefined

#### <static> showApproveDialog(from)

  Create and show approve dialog

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `from` | type | valid jid

  Source:
    - jsxc.lib.gui.js, line 610

#### <static> showAuthFail() → {undefined}

  Create and show a auth fail dialog
  Source:
    - jsxc.lib.gui.js, line 769

  ##### Returns:

  Type
    undefined

#### <static> showConfirmDialog(msg, confirm, dismiss) → {undefined}

  Create and show a confirm dialog

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `msg` | String | Message
  `confirm` | function |
  `dismiss` | function |

  Source:
    - jsxc.lib.gui.js, line 793

  ##### Returns:

  Type
    undefined

#### <static> showContactDialog(username)

  Create and show dialog to add a buddy

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `username` | string | <optional> | jabber id

  Source:
    - jsxc.lib.gui.js, line 644

#### <static> showDebugLog()

  Show debug log.
  Source:
    - jsxc.lib.gui.js, line 825

#### <static> showFingerprints(bid)

  Creates and show the fingerprint dialog

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` | String |

  Source:
    - jsxc.lib.gui.js, line 476

#### <static> showLoginBox()

  Creates and show loginbox
  Source:
    - jsxc.lib.gui.js, line 423

#### <static> showRemoveDialog(bid) → {undefined}

  Create and show dialog to remove a buddy

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` | type |

  Source:
    - jsxc.lib.gui.js, line 720

  ##### Returns:

  Type
    undefined

#### <static> showRequestNotification()

  Show prompt for notification permission.
  Source:
    - jsxc.lib.gui.js, line 1078

#### <static> showVcard(jid)

  Show vCard of user with the given bar jid.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `jid` | String |

  Source:
    - jsxc.lib.gui.js, line 857

#### <static> showVerification(bid)

  Creates and show the verification dialog

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` | String |

  Source:
    - jsxc.lib.gui.js, line 485

#### <static> showVideoWindow()

  Display window for video call.
  Source:
    - jsxc.lib.webrtc.js, line 1027

#### <static> showWaitAlert(msg) → {undefined}

  Create and show a wait dialog

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `msg` | type | message to display to the user

  Source:
    - jsxc.lib.gui.js, line 748

  ##### Returns:

  Type
    undefined

#### <static> toggleList()

  Toggle list with timeout, like menu or settings
  Source:
    - jsxc.lib.gui.js, line 381

#### <static> tooltip(selector)

  Init tooltip plugin for given jQuery selector.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `selector` | String | jQuery selector

  Source:
    - jsxc.lib.gui.js, line 159

#### <static> unreadMsg(bid)

  Switch read state to UNread and increase counter.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` |  |

  Source:
    - jsxc.lib.gui.js, line 1244

#### <static> update(bid)

  Updates Information in roster and chatbar

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` | String | bar jid

  Source:
    - jsxc.lib.gui.js, line 175

#### <static> updateAvatar(el, jid, aid)

  Update avatar on all given elements.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `el` | jQuery | Elements with subelement .jsxc_avatar
  `jid` | string | Jid
  `aid` | string | Avatar id (sha1 hash of image)

  Source:
    - jsxc.lib.gui.js, line 249

#### <static> updatePresence(bid, pres)

  Update all presence objects for given user.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` |  | bar jid of user.
  `pres` | CONST.STATUS | New presence state.

  Source:
    - jsxc.lib.gui.js, line 1210

#### <static> updateWindowListSB()

  Updates scrollbar handlers.
  Source:
    - jsxc.lib.gui.js, line 324