The Smart Text Engine is an object is used in conjection with a GtkTextView to highlight phone numbers,URLs and email addresses. When the user activates these highlighted strings, the information is sent to the exchange manager, which may activate the dialer, web browser, or email program depending on the type of link the user has activated.
To use the ALP smart text engine, you need to link with the libalp_max.so shared library and include <alp/smarttext.h>. Create a GtkTextView and then create a smart text engine using alp_smart_text_new.
|
Data Structures |
| struct | _AlpSmartText |
| struct | _AlpSmartTextClass |
Defines |
| #define | ALP_IS_SMART_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ALP_TYPE_SMART_TEXT)) |
| #define | ALP_IS_SMART_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ALP_TYPE_SMART_TEXT)) |
| #define | ALP_SMART_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ALP_TYPE_SMART_TEXT, AlpSmartText)) |
| #define | ALP_SMART_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ALP_TYPE_SMART_TEXT, AlpSmartTextClass)) |
| #define | ALP_SMART_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ALP_TYPE_SMART_TEXT, AlpSmartTextClass)) |
| #define | ALP_SMART_TEXT_TAG_NAME_EMAIL "AlpSmartTextEmail" |
| #define | ALP_SMART_TEXT_TAG_NAME_INTLNUM "AlpSmartTextIntl" |
| #define | ALP_SMART_TEXT_TAG_NAME_LOCALNUM "AlpSmartTextLocal" |
| #define | ALP_SMART_TEXT_TAG_NAME_RTSP "AlpSmartTextRtsp" |
| #define | ALP_SMART_TEXT_TAG_NAME_URL "AlpSmartTextUrl" |
| #define | ALP_SMART_TEXT_TAG_NAME_USSDREQ "AlpSmartTextUssdReq" |
| #define | ALP_TYPE_SMART_TEXT (alp_smart_text_get_type()) |
Typedefs |
| typedef _AlpSmartText | AlpSmartText |
| typedef _AlpSmartTextClass | AlpSmartTextClass |
| typedef void(* | AlpSmartTextHandlerCallback )(GtkTextTag *tag, char *text, GtkWidget *widget, void *userdata) |
| | Callback function that performs an action when the user activates a smart text tag.
|
Functions |
| GtkTextTag * | alp_smart_text_create_tag (AlpSmartText *self, char *name) |
| | Create a tag that looks like a Smart Text Engine tag. Adds the tag to the text buffer.
|
| void | alp_smart_text_enable_tag (AlpSmartText *self, GtkTextTag *tag, bool enable) |
| | Enables or disables the recognizer and handler associated with a particular tag.
|
| GtkTextTag * | alp_smart_text_get_tag_with_name (AlpSmartText *self, char *name) |
| | Convenience function that returns a pointer to the text tag with the specified name.
|
| GType | alp_smart_text_get_type (void) G_GNUC_CONST |
| | This is the function behind the GTK ALP_TYPE_SMART_TEXT macro that is used in macros like ALP_SMART_TEXT and ALP_IS_SMART_TEXT - you will probably never have any reason to call this method directly.
|
| AlpSmartText * | alp_smart_text_new (GtkTextView *textView) |
| | Creates a new AlpSmartText engine and attaches it to the specified text view.
|
| void | alp_smart_text_set_handler_for_tag (AlpSmartText *self, GtkTextTag *tag, AlpSmartTextHandlerCallback handlerCallback, void *handlerUserdata) |
| | Sets the event handler callback for the specified tag.
|
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.