Function

Purplerequest_input

Declaration [src]

void*
purple_request_input (
  void* handle,
  const char* title,
  const char* primary,
  const char* secondary,
  const char* default_value,
  gboolean multiline,
  gboolean masked,
  gchar* hint,
  const char* ok_text,
  GCallback ok_cb,
  const char* cancel_text,
  GCallback cancel_cb,
  PurpleRequestCommonParameters* cpar,
  void* user_data
)

Description [src]

Prompts the user for text input.

Parameters

handle

Type: void*

The plugin or connection handle. For some things this is extremely important. The handle is used to programmatically close the request dialog when it is no longer needed. For protocols this is often a pointer to the PurpleConnection instance. For plugins this should be a similar, unique memory location. This value is important because it allows a request to be closed with purple_request_close_with_handle() when, for example, you sign offline. If the request is not closed it is very likely to cause a crash whenever the callback handler functions are triggered.

The argument can be NULL.
The data is owned by the caller of the function.
title

Type: const char*

The title of the message, or NULL if it should have no title.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
primary

Type: const char*

The main point of the message, or NULL if you’re feeling enigmatic.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
secondary

Type: const char*

Secondary information, or NULL if there is none.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
default_value

Type: const char*

The default value.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
multiline

Type: gboolean

TRUE if the inputted text can span multiple lines.

masked

Type: gboolean

TRUE if the inputted text should be masked in some way (such as by displaying characters as stars). This might be because the input is some kind of password.

hint

Type: gchar*

Optionally suggest how the input box should appear. Use “html”, for example, to allow the user to enter HTML.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
ok_text

Type: const char*

The text for the OK button, which may not be NULL.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
ok_cb

Type: GCallback

The callback for the OK button, which may not be NULL.

cancel_text

Type: const char*

The text for the Cancel button, which may not be NULL.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
cancel_cb

Type: GCallback

The callback for the Cancel button, which may be NULL.

cpar

Type: PurpleRequestCommonParameters

The PurpleRequestCommonParameters object, which gets unref’ed after this call.

The data is owned by the caller of the function.
user_data

Type: void*

The data to pass to the callback.

The argument can be NULL.
The data is owned by the caller of the function.

Return value

Type: void*

A UI-specific handle.

The data is owned by the called function.
The return value can be NULL.