/**
* SECTION:hildon-find-toolbar
- * @short_description: A special toolbar to be used with HildonAppView
- * @see_also: #HildonAppView
+ * @short_description: A special toolbar to be used with HildonWindow.
+ * @see_also: #HildonWindow
*
* HildonFindToolbar is a predefined toolbar for text searching purpose.
* It contains a GtkListStore which has the text items that the user has
#define _(String) \
dgettext("hildon-libs", String)
-/*same define as gtkentry.c as entry will further handle this*/
+/* Same define as gtkentry.c as entry will further handle this */
#define MAX_SIZE G_MAXUSHORT
static guint HildonFindToolbar_signal [LAST_SIGNAL] = {0};
+/**
+ * hildon_find_toolbar_get_type:
+ *
+ * Initializes and returns the type of a hildon fond toolbar.
+ *
+ * @Returns: GType of #HildonFindToolbar
+ */
GType G_GNUC_CONST
hildon_find_toolbar_get_type (void)
{
klass->history_append = (gpointer) hildon_find_toolbar_history_append;
- g_object_class_install_property(object_class, PROP_LABEL,
- g_param_spec_string("label",
+ /**
+ * HildonFindToolbar:label:
+ *
+ * The label to display before the search box.
+ *
+ */
+ g_object_class_install_property (object_class, PROP_LABEL,
+ g_param_spec_string ("label",
"Label", "Displayed name for"
" find-toolbar",
_("ecdg_ti_find_toolbar_label"),
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
- g_object_class_install_property(object_class, PROP_PREFIX,
- g_param_spec_string("prefix",
+ /**
+ * HildonFindToolbar:label:
+ *
+ * The label to display before the search box.
+ *
+ */
+ g_object_class_install_property (object_class, PROP_PREFIX,
+ g_param_spec_string ("prefix",
"Prefix", "Search string", NULL,
G_PARAM_READWRITE));
- g_object_class_install_property(object_class, PROP_LIST,
- g_param_spec_object("list",
+ /**
+ * HildonFindToolbar:list:
+ *
+ * A #GtkListStore where the search history is kept.
+ *
+ */
+ g_object_class_install_property (object_class, PROP_LIST,
+ g_param_spec_object ("list",
"List"," GtkListStore model where "
"history list is kept",
GTK_TYPE_LIST_STORE,
G_PARAM_READWRITE));
+ /**
+ * HildonFindToolbar:column:
+ *
+ * The column number in GtkListStore where strings of
+ * search history are kept.
+ *
+ */
g_object_class_install_property(object_class, PROP_COLUMN,
- g_param_spec_int("column",
+ g_param_spec_int ("column",
"Column", "Column number in GtkListStore "
"where history list strings are kept",
0, G_MAXINT,
0, G_PARAM_READWRITE));
- g_object_class_install_property(object_class, PROP_MAX,
- g_param_spec_int("max_characters",
+ /**
+ * HildonFindToolbar:label:
+ *
+ * The label to display before the search box.
+ *
+ */
+ g_object_class_install_property (object_class, PROP_MAX,
+ g_param_spec_int ("max_characters",
"Maximum number of characters",
"Maximum number of characters "
"in search string",
0, G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
- g_object_class_install_property(object_class, PROP_HISTORY_LIMIT,
- g_param_spec_int("history_limit",
+ /**
+ * HildonFindToolbar:history-limit:
+ *
+ * Maximum number of history items in the combobox.
+ *
+ */
+ g_object_class_install_property (object_class, PROP_HISTORY_LIMIT,
+ g_param_spec_int ("history-limit",
"Maximum number of history items",
"Maximum number of history items "
"in search combobox",
* @label: label for the find_toolbar, NULL to set the label to
* default "Find"
*
- * Returns a new HildonFindToolbar.
+ * Creates a new HildonFindToolbar.
*
* Returns: a new HildonFindToolbar
*/
-
GtkWidget*
hildon_find_toolbar_new (const gchar *label)
{
}
/**
- * hildon_find_toolbar_new_with_model
+ * hildon_find_toolbar_new_with_model:
* @label: label for the find_toolbar, NULL to set the label to
* default "Find"
* @model: a @GtkListStore
* @column: indicating which column the search histry list will
* retreive string from
*
- * Returns a new HildonFindToolbar, with a model.
+ * Creates a new HildonFindToolbar with a model.
*
* Returns: a new #HildonFindToolbar
*/
}
/**
- * hildon_find_toolbar_highlight_entry
+ * hildon_find_toolbar_highlight_entry:
* @ftb: find Toolbar whose entry is to be highlighted
* @get_focus: if user passes TRUE to this value, then the text in
* the entry will not only get highlighted, but also get focused.
+ *
+ * Highlights the current entry in the find toolbar.
*
*/
void
gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
- if(get_focus)
+ if (get_focus)
gtk_widget_grab_focus (GTK_WIDGET (entry));
}
#define OFF_BIT 0x02
+/**
+ * hildon_font_selection_dialog_get_type:
+ *
+ * Initializes and returns the type of a hildon font selection dialog
+ *
+ * @Returns: GType of #HildonFontSelectionDialog
+ */
GType G_GNUC_CONST
hildon_font_selection_dialog_get_type (void)
{
gobject_class->get_property = hildon_font_selection_dialog_get_property;
gobject_class->set_property = hildon_font_selection_dialog_set_property;
- /* Install property to the class */
+ /* Install properties to the class */
+
+ /**
+ * HildonFontSelectionDialog:family:
+ *
+ * Font family used.
+ */
g_object_class_install_property (gobject_class, PROP_FAMILY,
g_param_spec_string ("family",
"Font family", "String defines"
" the font family", "Sans",
G_PARAM_READWRITE));
+ /**
+ * HildonFontSelectionDialog:family-set:
+ *
+ * Is font family set or inconsistent.
+ */
g_object_class_install_property (gobject_class, PROP_FAMILY_SET,
g_param_spec_boolean ("family-set",
"family inconsistent state",
" is inconsistent", FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ /**
+ * HildonFontSelectionDialog:size:
+ *
+ * Font size.
+ */
g_object_class_install_property (gobject_class, PROP_SIZE,
g_param_spec_int ("size",
"Font size",
6, 32, 16,
G_PARAM_READWRITE));
+ /**
+ * HildonFontSelectionDialog:size-set:
+ *
+ * Is font size set or inconsistent.
+ */
g_object_class_install_property (gobject_class, PROP_SIZE_SET,
g_param_spec_boolean ("size-set",
"size inconsistent state",
" is inconsistent", FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ /**
+ * HildonFontSelectionDialog:color:
+ *
+ * GdkColor for the text.
+ */
g_object_class_install_property (gobject_class, PROP_COLOR,
g_param_spec_boxed ("color",
"text color",
GDK_TYPE_COLOR,
G_PARAM_READWRITE));
+ /**
+ * HildonFontSelectionDialog:color-set:
+ *
+ * Is font color set or inconsistent.
+ */
g_object_class_install_property (gobject_class, PROP_COLOR_SET,
g_param_spec_boolean ("color-set",
"color inconsistent state",
" is inconsistent", FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ /**
+ * HildonFontSelectionDialog:color-set:
+ *
+ * Is font set as bold.
+ */
g_object_class_install_property (gobject_class, PROP_BOLD,
g_param_spec_boolean ("bold",
"text weight",
FALSE,
G_PARAM_READWRITE));
+ /**
+ * HildonFontSelectionDialog:color-set:
+ *
+ * Is font bold status set or inconsistent.
+ */
g_object_class_install_property (gobject_class, PROP_BOLD_SET,
g_param_spec_boolean ("bold-set",
"bold inconsistent state",
" is inconsistent", FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ /**
+ * HildonFontSelectionDialog:italic:
+ *
+ * Is font set as italic.
+ */
g_object_class_install_property (gobject_class, PROP_ITALIC,
g_param_spec_boolean ("italic",
"text style",
FALSE,
G_PARAM_READWRITE));
+ /**
+ * HildonFontSelectionDialog:italic-set:
+ *
+ * Is font italic status set or inconsistent.
+ */
g_object_class_install_property (gobject_class, PROP_ITALIC_SET,
g_param_spec_boolean ("italic-set",
"italic inconsistent state",
" is inconsistent", FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ /**
+ * HildonFontSelectionDialog:underline:
+ *
+ * Is the font underlined.
+ */
g_object_class_install_property (gobject_class, PROP_UNDERLINE,
g_param_spec_boolean ("underline",
"text underline",
FALSE,
G_PARAM_READWRITE));
+ /**
+ * HildonFontSelectionDialog:underline:
+ *
+ * Is font underline status set or inconsistent.
+ */
g_object_class_install_property (gobject_class, PROP_UNDERLINE_SET,
g_param_spec_boolean ("underline-set",
"underline inconsistent state",
" is inconsistent", FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ /**
+ * HildonFontSelectionDialog:strikethrough:
+ *
+ * Is the font striken-through.
+ */
g_object_class_install_property (gobject_class, PROP_STRIKETHROUGH,
g_param_spec_boolean ("strikethrough",
"strikethroughed text",
FALSE,
G_PARAM_READWRITE));
+ /**
+ * HildonFontSelectionDialog:strikethrough-set:
+ *
+ * Is the font strikenthrough status set.
+ */
g_object_class_install_property (gobject_class, PROP_STRIKETHROUGH_SET,
g_param_spec_boolean ("strikethrough-set",
"strikethrough inconsistent state",
" is inconsistent", FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ /**
+ * HildonFontSelectionDialog:position:
+ *
+ * The font positioning versus baseline.
+ */
g_object_class_install_property (gobject_class, PROP_POSITION,
g_param_spec_int ("position",
"Font position",
-1, 1, 0,
G_PARAM_READWRITE));
- g_object_class_install_property (gobject_class, PROP_FONT_SCALING,
- g_param_spec_double ("font-scaling",
- "Font scaling",
- "Font scaling for the preview dialog",
- 0, 10, 1,
- G_PARAM_READWRITE));
-
+ /**
+ * HildonFontSelectionDialog:position-set:
+ *
+ * Is the font positioning set.
+ */
g_object_class_install_property (gobject_class, PROP_POSITION_SET,
g_param_spec_boolean ("position-set",
"position inconsistent state",
" is inconsistent", FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ /**
+ * HildonFontSelectionDialog:font-scaling:
+ *
+ * The font scaling factor applied to the preview dialog.
+ */
+ g_object_class_install_property (gobject_class, PROP_FONT_SCALING,
+ g_param_spec_double ("font-scaling",
+ "Font scaling",
+ "Font scaling for the preview dialog",
+ 0, 10, 1,
+ G_PARAM_READWRITE));
+
+ /**
+ * HildonFontSelectionDialog:preview-text:
+ *
+ * The text used for the preview dialog.
+ */
g_object_class_install_property (gobject_class, PROP_PREVIEW_TEXT,
g_param_spec_string("preview-text",
"Preview Text",
"",
G_PARAM_READWRITE));
- g_type_class_add_private (klass, sizeof(struct _HildonFontSelectionDialogPrivate));
+ g_type_class_add_private (klass,
+ sizeof (struct _HildonFontSelectionDialogPrivate));
}
static void
gtk_widget_destroy (preview_dialog);
}
-
static gboolean
is_internal_font (const gchar * name)
{
*
* Returns: a string pointer
*/
-gchar *
-hildon_font_selection_dialog_get_preview_text(HildonFontSelectionDialog * fsd)
+gchar*
+hildon_font_selection_dialog_get_preview_text (HildonFontSelectionDialog * fsd)
{
/* FIXME Return a const pointer? */
HildonFontSelectionDialogPrivate *priv;