AlpBrowserView
[UI Widgets]


Data Structures

struct  _AlpBrowserView
struct  _AlpBrowserViewClass
struct  AlpBrowserViewFocusTargetInfo

BrowserView Display Modes

See alp_browser_view_new().

#define ALP_BROWSER_VIEW_DISPLAY_MODE_DESKTOP   1
#define ALP_BROWSER_VIEW_DISPLAY_MODE_SMART_FIT   3
#define ALP_BROWSER_VIEW_DISPLAY_MODE_TEXT   2
typedef guint AlpBrowserViewDisplayMode

BrowserView Focus Target Types

These input form type values are used within the AlpBrowserViewFocusTargetInfo data structure, which is obtained with alp_browser_view_get_target_info().

#define ALP_BROWSER_VIEW_TARGET_ANCHO_HTTP   1
#define ALP_BROWSER_VIEW_TARGET_ANCHO_MAILTO   15
#define ALP_BROWSER_VIEW_TARGET_ANCHO_TEL   2
#define ALP_BROWSER_VIEW_TARGET_ANCHO_TELAV   3
#define ALP_BROWSER_VIEW_TARGET_IFRAME   16
#define ALP_BROWSER_VIEW_TARGET_IMAGE   4
#define ALP_BROWSER_VIEW_TARGET_INPUT_BUTTON   5
#define ALP_BROWSER_VIEW_TARGET_INPUT_CHECKBOX   6
#define ALP_BROWSER_VIEW_TARGET_INPUT_FILE   7
#define ALP_BROWSER_VIEW_TARGET_INPUT_PASSWORD   8
#define ALP_BROWSER_VIEW_TARGET_INPUT_RADIO   9
#define ALP_BROWSER_VIEW_TARGET_INPUT_RESET   10
#define ALP_BROWSER_VIEW_TARGET_INPUT_SELECT   11
#define ALP_BROWSER_VIEW_TARGET_INPUT_SUBMIT   12
#define ALP_BROWSER_VIEW_TARGET_INPUT_TEXT   13
#define ALP_BROWSER_VIEW_TARGET_INPUT_TEXTAREA   14
typedef guint AlpBrowserViewFocusTargetType

BrowserView Library initialization error codes

Used by: each function in this API that returns a value from the following list.

#define ALP_BROWSERVIEW_ERROR_CANTOPEN   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00070000))
#define ALP_BROWSERVIEW_ERROR_GENERIC   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00080000))
#define ALP_BROWSERVIEW_ERROR_INUSE   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00020000))
#define ALP_BROWSERVIEW_ERROR_INVALIDPARAM   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00040000))
#define ALP_BROWSERVIEW_ERROR_NOTFOUND   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00050000))
#define ALP_BROWSERVIEW_ERROR_NOTINITIALIZED   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00060000))
#define ALP_BROWSERVIEW_ERROR_OUTOFMEMORY   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00030000))
#define ALP_BROWSERVIEW_ERROR_SUCCESS   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00010000))

BrowserView Scrolling Directions

Used as a parameter of alp_browser_view_can_scroll() to query scroll status.

#define AlpBrowserViewDirDown   4
#define AlpBrowserViewDirLeft   1
#define AlpBrowserViewDirRight   2
#define AlpBrowserViewDirUp   3
typedef guint AlpBrowserViewScrollDirection

BrowserView font size

Used as a parameter of alp_browser_view_set_font_size().

#define AlpBrowserViewFontSizeLarge   3
#define AlpBrowserViewFontSizeNormal   2
#define AlpBrowserViewFontSizeSmall   1
typedef guint AlpBrowserViewFontSize

BrowserView Submit Form Methods

Used by alp_browser_view_submit_form_callback, to describe the submit method to use.

#define AlpBrowserViewHttpMethodGet   1
#define AlpBrowserViewHttpMethodPost   2
typedef guint AlpBrowserViewSubmitFormMethod

BrowserView Progress Status

The progress information can be obtained by setting up a notification callback. See alp_browser_view_set_progress_callback(), and see alp_browser_view_progress_callback for reference.

#define AlpBrowserViewInputFormatCheckFailed   8
#define AlpBrowserViewProgressAuthenticationDone   7
#define AlpBrowserViewProgressAuthenticationFailed   6
#define AlpBrowserViewProgressAuthenticationStart   5
#define AlpBrowserViewProgressBusy   2
#define AlpBrowserViewProgressDone   1
#define AlpBrowserViewProgressError   4
#define AlpBrowserViewProgressFileOperationError   10
#define AlpBrowserViewProgressHTTPError   9
#define AlpBrowserViewProgressOutOfMemory   3
typedef guint AlpBrowserViewProgressStatus

The BrowserView flag of focus move out

Used by alp_browser_view_set_focus_move_out_flag

enum  { AlpBrowserViewFocusMoveOutLeft = 1, AlpBrowserViewFocusMoveOutRight = 2, AlpBrowserViewFocusMoveOutUp = 4, AlpBrowserViewFocusMoveOutDown = 8 }

Defines

#define ALP_BROWSER_VIEW(obj)   GTK_CHECK_CAST (obj, alp_browser_view_get_type (), AlpBrowserView)
#define ALP_BROWSER_VIEW_CLASS(klass)   GTK_CHECK_CLASS_CAST (klass, alp_browser_view_get_type (), AlpBrowserViewClass)
#define ALP_IS_BROWSER_VIEW(obj)   GTK_CHECK_TYPE (obj, alp_browser_view_get_type ())
#define ALP_TYPE_BROWSERVIEW   (alp_browser_view_get_type())

Typedefs

typedef gboolean alp_browser_view_authenticate_callback (GtkWidget *widget, gchar *url, gchar **userName, gchar **password)
typedef gboolean alp_browser_view_link_selection_callback (GtkWidget *widget, gchar *url, void *callBackData)
typedef void alp_browser_view_progress_callback (GtkWidget *widget, gchar *url, AlpBrowserViewProgressStatus status)
typedef gboolean alp_browser_view_scan_hyperlink_callback (GtkWidget *widget, gchar *buffer, guint length, guint *patternStart, gint *patternEnd, gint *patternType)
typedef gboolean alp_browser_view_submit_form_callback (GtkWidget *widget, gchar *url, AlpBrowserViewSubmitFormMethod method, gchar *postData, void *callBackData)
typedef _AlpBrowserView AlpBrowserView
typedef _AlpBrowserViewClass AlpBrowserViewClass
typedef void * AlpBrowserViewContent

Functions

alp_status_t alp_browser_view_abort (GtkWidget *widget)
alp_status_t alp_browser_view_add_binary_data (GtkWidget *widget, AlpBrowserViewContent *content, gchar *url, gchar *mimeType, void *data, guint dataSize)
alp_status_t alp_browser_view_add_text_data (GtkWidget *widget, AlpBrowserViewContent *content, gchar *url, gchar *mimeType, gchar *charset, void *data, guint dataSize)
alp_status_t alp_browser_view_can_scroll (GtkWidget *widget, AlpBrowserViewScrollDirection direction, gboolean *canScroll)
alp_status_t alp_browser_view_clear_screen (GtkWidget *widget)
alp_status_t alp_browser_view_create_content_object (GtkWidget *widget, AlpBrowserViewContent **content)
alp_status_t alp_browser_view_destroy (GtkWidget *widget)
alp_status_t alp_browser_view_destroy_content_object (GtkWidget *widget, AlpBrowserViewContent *content)
alp_status_t alp_browser_view_find_text (GtkWidget *widget, gchar *searchString, gboolean wrapSearch, gint searchDirection)
alp_status_t alp_browser_view_get_target_info (GtkWidget *widget, AlpBrowserViewFocusTargetInfo *targetInfo)
alp_status_t alp_browser_view_get_text_selection (GtkWidget *widget, gchar **selectedText)
GType alp_browser_view_get_type ()
alp_status_t alp_browser_view_get_vertical_scroll_position (GtkWidget *widget, guint *position)
alp_status_t alp_browser_view_library_finalize (void)
alp_status_t alp_browser_view_library_initialize (void)
alp_status_t alp_browser_view_library_set_cnc_profile (const gchar *profile_name)
GtkWidget * alp_browser_view_new (GtkAllocation *rect, AlpBrowserViewDisplayMode mode, gchar *url, alp_status_t *err)
alp_status_t alp_browser_view_redraw_screen (GtkWidget *widget)
alp_status_t alp_browser_view_refresh (GtkWidget *widget)
alp_status_t alp_browser_view_render_data (GtkWidget *widget, AlpBrowserViewContent *content)
alp_status_t alp_browser_view_select_all_text (GtkWidget *widget)
alp_status_t alp_browser_view_set_authenticate_callback (GtkWidget *widget, alp_browser_view_authenticate_callback *callBack)
alp_status_t alp_browser_view_set_focus_move_out_flag (GtkWidget *widget, gint flag)
alp_status_t alp_browser_view_set_font_size (GtkWidget *widget, AlpBrowserViewFontSize value)
alp_status_t alp_browser_view_set_hyperlink_scan_callback (GtkWidget *widget, alp_browser_view_scan_hyperlink_callback *callBack)
alp_status_t alp_browser_view_set_link_selection_callback (GtkWidget *widget, alp_browser_view_link_selection_callback *callBack, void *callBackData)
alp_status_t alp_browser_view_set_progress_callback (GtkWidget *widget, alp_browser_view_progress_callback *notifyCallBack)
alp_status_t alp_browser_view_set_submit_callback (GtkWidget *widget, alp_browser_view_submit_form_callback *callBack, void *callBackData)
alp_status_t alp_browser_view_set_vertical_scroll_position (GtkWidget *widget, guint newPosition)


Define Documentation

#define ALP_BROWSER_VIEW obj   )     GTK_CHECK_CAST (obj, alp_browser_view_get_type (), AlpBrowserView)
 

#define ALP_BROWSER_VIEW_CLASS klass   )     GTK_CHECK_CLASS_CAST (klass, alp_browser_view_get_type (), AlpBrowserViewClass)
 

#define ALP_BROWSER_VIEW_DISPLAY_MODE_DESKTOP   1
 

#define ALP_BROWSER_VIEW_DISPLAY_MODE_SMART_FIT   3
 

#define ALP_BROWSER_VIEW_DISPLAY_MODE_TEXT   2
 

#define ALP_BROWSER_VIEW_TARGET_ANCHO_HTTP   1
 

#define ALP_BROWSER_VIEW_TARGET_ANCHO_MAILTO   15
 

#define ALP_BROWSER_VIEW_TARGET_ANCHO_TEL   2
 

#define ALP_BROWSER_VIEW_TARGET_ANCHO_TELAV   3
 

#define ALP_BROWSER_VIEW_TARGET_IFRAME   16
 

#define ALP_BROWSER_VIEW_TARGET_IMAGE   4
 

#define ALP_BROWSER_VIEW_TARGET_INPUT_BUTTON   5
 

#define ALP_BROWSER_VIEW_TARGET_INPUT_CHECKBOX   6
 

#define ALP_BROWSER_VIEW_TARGET_INPUT_FILE   7
 

#define ALP_BROWSER_VIEW_TARGET_INPUT_PASSWORD   8
 

#define ALP_BROWSER_VIEW_TARGET_INPUT_RADIO   9
 

#define ALP_BROWSER_VIEW_TARGET_INPUT_RESET   10
 

#define ALP_BROWSER_VIEW_TARGET_INPUT_SELECT   11
 

#define ALP_BROWSER_VIEW_TARGET_INPUT_SUBMIT   12
 

#define ALP_BROWSER_VIEW_TARGET_INPUT_TEXT   13
 

#define ALP_BROWSER_VIEW_TARGET_INPUT_TEXTAREA   14
 

#define ALP_BROWSERVIEW_ERROR_CANTOPEN   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00070000))
 

#define ALP_BROWSERVIEW_ERROR_GENERIC   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00080000))
 

#define ALP_BROWSERVIEW_ERROR_INUSE   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00020000))
 

#define ALP_BROWSERVIEW_ERROR_INVALIDPARAM   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00040000))
 

#define ALP_BROWSERVIEW_ERROR_NOTFOUND   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00050000))
 

#define ALP_BROWSERVIEW_ERROR_NOTINITIALIZED   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00060000))
 

#define ALP_BROWSERVIEW_ERROR_OUTOFMEMORY   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00030000))
 

#define ALP_BROWSERVIEW_ERROR_SUCCESS   ((alp_status_t) (ALP_CLASS_BROWSERVIEW | 0x00010000))
 

#define ALP_IS_BROWSER_VIEW obj   )     GTK_CHECK_TYPE (obj, alp_browser_view_get_type ())
 

#define ALP_TYPE_BROWSERVIEW   (alp_browser_view_get_type())
 

#define AlpBrowserViewDirDown   4
 

#define AlpBrowserViewDirLeft   1
 

#define AlpBrowserViewDirRight   2
 

#define AlpBrowserViewDirUp   3
 

#define AlpBrowserViewFontSizeLarge   3
 

#define AlpBrowserViewFontSizeNormal   2
 

#define AlpBrowserViewFontSizeSmall   1
 

#define AlpBrowserViewHttpMethodGet   1
 

#define AlpBrowserViewHttpMethodPost   2
 

#define AlpBrowserViewInputFormatCheckFailed   8
 

#define AlpBrowserViewProgressAuthenticationDone   7
 

#define AlpBrowserViewProgressAuthenticationFailed   6
 

#define AlpBrowserViewProgressAuthenticationStart   5
 

#define AlpBrowserViewProgressBusy   2
 

#define AlpBrowserViewProgressDone   1
 

#define AlpBrowserViewProgressError   4
 

#define AlpBrowserViewProgressFileOperationError   10
 

#define AlpBrowserViewProgressHTTPError   9
 

#define AlpBrowserViewProgressOutOfMemory   3
 


Typedef Documentation

typedef gboolean alp_browser_view_authenticate_callback(GtkWidget *widget, gchar *url, gchar **userName, gchar **password)
 

Call back definition for authentication This function is called by BrowserView when authentication is requested.

Parameters:
[in] widget - browserView widget pointer
[in] url - URL that requests authentication
[out] userName - returns a newly-allocated user-name string for the given URL, ending in -0; the BrowserView library then frees the buffer
[out] password - returns a newly-allocated password string for the given URL, ending in -0; the BrowserView library then frees the buffer
Returns:
TRUE if the user name and password for the given URL are successfully retrieved; returns FALSE if the user name and password for the given URL are not successfully retrieved

typedef gboolean alp_browser_view_link_selection_callback(GtkWidget *widget, gchar *url, void *callBackData)
 

Call back definition for text selection. Definition for function that will be called when a hyperlink selection is made. See alp_browser_view_set_link_selection_callback().

Parameters:
[in] widget - browserView widget pointer
[in] url - the URL being selected
[in] callBackData - user data that was passed in to alp_browser_view_set_link_selection_callback()
Returns:
(to stop this link selection?)FALSE: browserView should go on with new link; TRUE: browserView abort this link selection

typedef void alp_browser_view_progress_callback(GtkWidget *widget, gchar *url, AlpBrowserViewProgressStatus status)
 

Call back definition for load progress notification. This function is called by browser view when load status changes

Parameters:
[in] widget - browserView widget pointer
[in] url - URL being loaded
[in] statusCode - one of AlpBrowserViewProgressStatus values
Returns:
nothing

typedef gboolean alp_browser_view_scan_hyperlink_callback(GtkWidget *widget, gchar *buffer, guint length, guint *patternStart, gint *patternEnd, gint *patternType)
 

Call back definition to scan for hyperlink-able text. This function makes it possible to turn a text pattern into traversable hyperlink. This callback function, if set, is called when a document (such as HTML) is parsed and displayed. The job of this function is to scan through a buffer, from start to the given 'length' position, and find the first pattern that looks like a hypertext link, such as a URL, email address, or phone number. If found, the pattern information is returned through output parameters. If the callback returns a pattern that is in the middle of the given buffer, and returns TRUE to notify the BrowserView library, then the BrowserView library calls the callback function again with the remaining buffer. If the output parameter is set to an invalid value, the remaining buffer is not passed to the callback function, so that the rest of the buffer cannot be scanned.

For example, if an email text pattern is found, such as "santa@northpole.org", then this function is to set (return) the pattern start and end index values. Then, what the browser view will do, as it constructs the page, is to create one hyperlink "mailto: santa@northpole.org" which still show as santa@northpole.org, however, can now be clicked.

Parameters:
[in] widget - browserView widget pointer
[in] buffer - document text buffer in which to scan for hyperlink-able text
[in] length - valid length of text buffer
[out] patternStart - where we think a hyperlink starts (include), as offset from beginning of buffer
[out] patternEnd - index within the buffer where hyperlink pattern ends (include)
[out] patternType - 1: phone number; 2:Email-address; 3:url; other value is invalid
Returns:
true if found pattern, false if no pattern found.

typedef gboolean alp_browser_view_submit_form_callback(GtkWidget *widget, gchar *url, AlpBrowserViewSubmitFormMethod method, gchar *postData, void *callBackData)
 

Call back definition for form submission. This function is called by browser view when user selects form submit.

Parameters:
[in] widget - browserView widget pointer
[in] url - URL to submit to
[in] method - the submission method
[in] postData - the data to submit when post
[in] callBackData - passed through user data
Returns:
FALSE: BrowserView continues and POSTs the data; TRUE: BrowserView aborts this submission

typedef struct _AlpBrowserView AlpBrowserView
 

typedef struct _AlpBrowserViewClass AlpBrowserViewClass
 

typedef void* AlpBrowserViewContent
 

AlpBrowserViewContent is used to hold the included data (ie, images).

typedef guint AlpBrowserViewDisplayMode
 

typedef guint AlpBrowserViewFocusTargetType
 

typedef guint AlpBrowserViewFontSize
 

typedef guint AlpBrowserViewProgressStatus
 

typedef guint AlpBrowserViewScrollDirection
 

typedef guint AlpBrowserViewSubmitFormMethod
 


Enumeration Type Documentation

anonymous enum
 

Enumerator:
AlpBrowserViewFocusMoveOutLeft 
AlpBrowserViewFocusMoveOutRight 
AlpBrowserViewFocusMoveOutUp 
AlpBrowserViewFocusMoveOutDown 


Function Documentation

alp_status_t alp_browser_view_abort GtkWidget *  widget  ) 
 

Aborts BrowserView activity. Stops data loading and rendering, but does not destroy view (does not clean up memory).

Parameters:
[in] widget - the BrowserView widget pointer
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed

alp_status_t alp_browser_view_add_binary_data GtkWidget *  widget,
AlpBrowserViewContent content,
gchar *  url,
gchar *  mimeType,
void *  data,
guint  dataSize
 

Adds a content object that is in binary. Adds the binary data of images and other binary objects.

Parameters:
[in] widget - the BrowserView widget pointer
[in] content - the pointer to the content data structure
[in] url - the URL of the content
[in] mimeType - the MIME type of the content
[in] data - the binary data block
[in] dataSize - the size of binary data block
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns one of the following error codes: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param content is NULL, param url is NULL, param data is NULL, or param dataSize is invalid; ALP_BROWSERVIEW_ERROR_OUTOFMEMORY - Out of memory

alp_status_t alp_browser_view_add_text_data GtkWidget *  widget,
AlpBrowserViewContent content,
gchar *  url,
gchar *  mimeType,
gchar *  charset,
void *  data,
guint  dataSize
 

Adds a content object that is in text. This API is for markup language data and other text data. This API MUST be given the main page text data the first time that it is called on each BrowserView instance. Other text data, such as sub-frame HTML data and CSS text data, can only be added after the main page text data.

Parameters:
[in] widget - the BrowserView widget pointer
[in] content - the pointer to the content data structure
[in] url - the URL of the content
[in] mimeType - the MIME type of the content
[in] charset - the character set
[in] data - the text data block
[in] dataSize - the size of the text block
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns one of the following error codes: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param content is NULL; param url is NULL; param data is NULL; or param dataSize is invalid; ALP_BROWSERVIEW_ERROR_OUTOFMEMORY - Out of memory

alp_status_t alp_browser_view_can_scroll GtkWidget *  widget,
AlpBrowserViewScrollDirection  direction,
gboolean *  canScroll
 

Determines the scroll status. When given a direction, this function determines whether or not there is room to scroll.

Parameters:
[in] widget - the BrowserView widget pointer
[in] direction - the direction of the scroll
[out] canScroll - a boolean indicating whether or not it is possible scroll
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param direction is invalid, or param canScroll is NULL.

alp_status_t alp_browser_view_clear_screen GtkWidget *  widget  ) 
 

Clears the screen. Clears the BrowserView screen and page data. This function is used by applications that need to frequently clear the page and update it to new content.

Parameters:
[in] widget - the BrowserView widget pointer
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns one of the following error codes: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; ALP_BROWSERVIEW_ERROR_GENERIC - finds a generic error

alp_status_t alp_browser_view_create_content_object GtkWidget *  widget,
AlpBrowserViewContent **  content
 

Creates the content object for included data.

Parameters:
[in] widget - the BrowserView widget pointer
[out] content - the pointer to the content data structure
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns one of the following error codes: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param content is NULL ALP_BROWSERVIEW_ERROR_OUTOFMEMORY - Out of memory

alp_status_t alp_browser_view_destroy GtkWidget *  widget  ) 
 

Destroy browser view widget. Terminate and clean up use of given browser view instance. All resources related to given browser view instance will be freed upon this call. This function MUST be explicitly called on a BrowserView instance when that instance is no longer useful. NOTE: Do not use gtk_widget_destroy on browser view, use this API instead. Calling this API is enough to destroy given browser view instance. There is no need to pre-remove the given BrowserView instance from the container. This API removes the given BrowserView instance from the container.

Parameters:
[in] widget - browserView widget pointer
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns one of the following error codes: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed ALP_BROWSERVIEW_ERROR_NOTFOUND - Some data member of the given widget is missing ALP_BROWSERVIEW_ERROR_INUSE - The BrowserView instance is in use by the BrowserView library itself, and therefore cannot be destroyed

alp_status_t alp_browser_view_destroy_content_object GtkWidget *  widget,
AlpBrowserViewContent content
 

Destroys and frees the content resources. Calling this function immediately after alp_browser_view_render_data can cause an error if the BrowserView core is still rendering the content. Therefore, this function should only be called on a content instance when the content for that instance has been fully rendered; it is best to call this function when the application using BrowserView exits.

Parameters:
[in] widget - the BrowserView widget pointer
[in] content - the pointer to the content data structure
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns one of the following error codes: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param content is NULL ALP_BROWSERVIEW_ERROR_OUTOFMEMORY -Out of memory

alp_status_t alp_browser_view_find_text GtkWidget *  widget,
gchar *  searchString,
gboolean  wrapSearch,
gint  searchDirection
 

Finds text. When given a text pattern, this function searches the text, and if found, then scrolls BrowserView to the location of the found text. The search is case insensitive.

Parameters:
[in] widget - the BrowserView widget pointer
[in] searchString -the search text pattern
[in] wrapSearch - if TRUE, the function may wrap the search around to the top of the page
[in] searchDirection - 0 searches backward from the current focus; 1 searches forward from the current focus; if there is no current focus, the search starts from the top
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns one of the the following error codes: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param searchString is NULL; or param searchDirection is out of the range ">=0 and <=1"; or the length of searchString is 0; ALP_BROWSERVIEW_ERROR_NOTFOUND - Did not find the given string according to the given conditions

alp_status_t alp_browser_view_get_target_info GtkWidget *  widget,
AlpBrowserViewFocusTargetInfo targetInfo
 

Gets the focus target information. Obtains information regarding the currently-focused target.

Parameters:
[in] widget - the BrowserView widget pointer
[out] targetInfo - fills the structure with information on the current focused target
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns one of the following error codes: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param targetInfo is NULL ALP_BROWSERVIEW_ERROR_GENERIC - Finds an internal error

alp_status_t alp_browser_view_get_text_selection GtkWidget *  widget,
gchar **  selectedText
 

Retrieves selected text. Returns the selected text in BrowserView.

Parameters:
[in] widget - the BrowserView widget pointer
[out] selectedText - the selected text. The user is responsible for freeing this memory.
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns one of the following error codes: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserVview type, or has been destroyed; or param selectedText is NULL ALP_BROWSERVIEW_ERROR_OUTOFMEMORY - Out of memory

GType alp_browser_view_get_type  ) 
 

returns browser view widget type.

alp_status_t alp_browser_view_get_vertical_scroll_position GtkWidget *  widget,
guint *  position
 

Retrieves the vertical scroll position, in a value between 0 and 100.

Parameters:
[in] widget - the BrowserView widget pointer
[out] position -the value of the scrollbar position
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param position is NULL

alp_status_t alp_browser_view_library_finalize void   ) 
 

Finalizes the BrowserView library. Should only be called once, after the last time that alp_browser_view_destroy is called.

Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_NOTINITIALIZED - the BrowserView library was not initialized

alp_status_t alp_browser_view_library_initialize void   ) 
 

Initializes the BrowserView library. Should only be called once, before the first time that alp_browser_view_new is called.

Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns one of the following error codes: ALP_BROWSERVIEW_ERROR_GENERIC - Finds a generic error ALP_BROWSERVIEW_ERROR_OUTOFMEMORY - Out of memory

alp_status_t alp_browser_view_library_set_cnc_profile const gchar *  profile_name  ) 
 

Sets the cnc profile that the BrowserView library uses to make the cnc connection. If the user application uses the BrowserView library to view web content, this API should be called after calling alp_browser_view_library_initialize and before calling alp_browser_view_new. Otherwise, this API is unnecessary.

Parameters:
[in] profile_name - the cnc connect profile name; use NULL to instruct the BrowserView library to use the default profile
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS - if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_OUTOFMEMORY - Out of memory

GtkWidget* alp_browser_view_new GtkAllocation *  rect,
AlpBrowserViewDisplayMode  mode,
gchar *  url,
alp_status_t err
 

Initialize browser view. Use this function to create and initialize an instance to the browser view API.

Parameters:
[in] rect - dimension allocation for browser view (x,y,width,height)
[in] mode - display mode: handheld of faithful
[in] url - an optional URL. If given, BrowserView loads the data; BrowserView passes NULL if no URL is used
[out] err - more detailed error information: ALP_BROWSERVIEW_ERROR_SUCCESS - Successfully created one browser view instance ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Either the width or height value of param rect is invalid, or param rect is NULL ALP_BROWSERVIEW_ERROR_OUTOFMEMORY - Out of memory; the create process is canceled
Returns:
browserView widget pointer, or NULL if unsuccessful

alp_status_t alp_browser_view_redraw_screen GtkWidget *  widget  ) 
 

Redraws the screen.

Parameters:
[in] widget -the BbrowserView widget pointer
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed

alp_status_t alp_browser_view_refresh GtkWidget *  widget  ) 
 

Refreshes the current location, and the data is reloaded from the source.

Parameters:
[in] widget - the BrowserView widget pointer
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS SUCCESS if successful, otherwise it returns one of the following error codes: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; ALP_BROWSERVIEW_ERROR_GENERIC - finds a generic internal error

alp_status_t alp_browser_view_render_data GtkWidget *  widget,
AlpBrowserViewContent content
 

Renders the given content data.

Parameters:
[in] widget - the BrowserView widget pointer
[in] content - the pointer to the content data structure
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns one of the following error codes: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param content is NULL, param url is NULL, param data is NULL, or param dataSize is invalid:

alp_status_t alp_browser_view_select_all_text GtkWidget *  widget  ) 
 

Selects all of the text in the given BrowserView widget.

Parameters:
[in] widget - the BrowserView widget pointer
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed.

alp_status_t alp_browser_view_set_authenticate_callback GtkWidget *  widget,
alp_browser_view_authenticate_callback callBack
 

Sets the callback for BrowserView to retrieve the user name and password when a URL requests authentication.

Parameters:
[in] widget - the BrowserView widget pointer
[in] callBack 
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param callBack is NULL

alp_status_t alp_browser_view_set_focus_move_out_flag GtkWidget *  widget,
gint  flag
 

Sets the BrowserView flag of focus move out. Note: If there is no bottom widget, the AlpBrowserViewFocusMoveOutDown flag must not be set. If there is no bottom or left widget, the AlpBrowserViewFocusMoveOutLeft flag must not be set.

For example, (AlpBrowserViewFocusMoveOutUp |AlpBrowserViewFocusMoveOutDown) is one valid flag. If this function is not called on a BrowserView instance, that instance uses the default flag (AlpBrowserViewFocusMoveOutUp | AlpBrowserViewFocusMoveOutLeft).

Parameters:
[in] widget - the BrowserView widget pointer
[in] flag - used to customize the BrowserView feature of focus move out For example, if the AlpBrowserViewFocusMoveOutDown flag is not set, the focus cannot be moved out of the BrowserView widget to the bottom widget. The flag MUST be a mix of the following: AlpBrowserViewFocusMoveOutLeft , AlpBrowserViewFocusMoveOutRight, AlpBrowserViewFocusMoveOutUp AlpBrowserViewFocusMoveOutDown
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param flag is invalid

alp_status_t alp_browser_view_set_font_size GtkWidget *  widget,
AlpBrowserViewFontSize  value
 

Sets the font size to small, normal (default), or large.

Parameters:
[in] widget - the BrowserView widget pointer
[in] value - see AlpBrowserViewFontSize
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param value is invalid.

alp_status_t alp_browser_view_set_hyperlink_scan_callback GtkWidget *  widget,
alp_browser_view_scan_hyperlink_callback callBack
 

Sets the callback to scan for hyperlink-able text. Sets the function to be called in order to scan for a segment of text that could be turned into hyperlink.

Parameters:
[in] widget - the BrowserView widget pointer
[in] callBack - the callback function; sets NULL to disable default hyperlink scan callback
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed

alp_status_t alp_browser_view_set_link_selection_callback GtkWidget *  widget,
alp_browser_view_link_selection_callback callBack,
void *  callBackData
 

Sets the selection callback. Sets the callback function when a hyperlink selection is made. See alp_browser_view_set_link_selection_callback(). If this API is not called on a BrowserView instance, BrowserView loads a new link.

Parameters:
[in] widget - the BrowserView widget pointer
[in] callBack - the selection callback function
[in] callBackData - any user data to be passed through
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param callBack is NULL

alp_status_t alp_browser_view_set_progress_callback GtkWidget *  widget,
alp_browser_view_progress_callback notifyCallBack
 

Sets the loading-progress-status notification callback. This function is called when the loading-progress status changes, such as in an HTTP load status change.

Parameters:
[in] widget - the BrowserView widget pointer
[in] notifyCallBack - the callback function for notification of AlpBrowserViewProgressStatus
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param callBack is NULL

alp_status_t alp_browser_view_set_submit_callback GtkWidget *  widget,
alp_browser_view_submit_form_callback callBack,
void *  callBackData
 

Sets the submission callback. This function is called whenever an input form is submitted.

Parameters:
[in] widget - the browserView widget pointer
[in] callBack - submits the callback function
[in] callBackData - any user data to be passed through
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param callBack is NULL

alp_status_t alp_browser_view_set_vertical_scroll_position GtkWidget *  widget,
guint  newPosition
 

Sets the vertical scroll position, in a value between 0 and 100.

Parameters:
[in] widget - the BrowserView widget pointer
[in] newPosition - the value of the scrollbar position
Returns:
ALP_BROWSERVIEW_ERROR_SUCCESS if successful, otherwise it returns the following error code: ALP_BROWSERVIEW_ERROR_INVALIDPARAM - Param widget is NULL, or is not of a BrowserView type, or has been destroyed; or param newPosition is not between 0 and 100.


Generated on Wed Jul 30 07:06:42 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.