summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-11-15 21:54:31 +0100
committerDave Davenport <qball@gmpclient.org>2016-11-15 21:54:31 +0100
commitb1a44cc65ea68f0a13674024b4f5e50d9db326ae (patch)
treedd8f5820ffef4407dcef28460a52c142cfdd6f4f /include
parent7e74d39a01958e2e9b26f614e1984d5be93c8cfa (diff)
Update code documentation
Diffstat (limited to 'include')
-rw-r--r--include/helper.h2
-rw-r--r--include/mode-private.h2
-rw-r--r--include/mode.h2
-rw-r--r--include/view.h44
-rw-r--r--include/widgets/listview.h10
-rw-r--r--include/widgets/textbox.h6
-rw-r--r--include/widgets/widget-internal.h2
-rw-r--r--include/widgets/widget.h12
-rw-r--r--include/x11-helper.h2
9 files changed, 58 insertions, 24 deletions
diff --git a/include/helper.h b/include/helper.h
index 65354269..ebb8355e 100644
--- a/include/helper.h
+++ b/include/helper.h
@@ -177,7 +177,7 @@ unsigned int levenshtein ( const char *needle, const char *haystack );
char * rofi_force_utf8 ( gchar *data, ssize_t length );
/**
- * @param data the array holding latin text
+ * @param input the char array holding latin text
* @param length the length of the data array
*
* Converts latin to UTF-8.
diff --git a/include/mode-private.h b/include/mode-private.h
index f3731143..fc6d6077 100644
--- a/include/mode-private.h
+++ b/include/mode-private.h
@@ -2,7 +2,7 @@
#define ROFI_MODE_PRIVATE_H
/**
- * @param data The #self pointer.
+ * @param data Pointer to #Mode object.
*
* Mode free function.
*/
diff --git a/include/mode.h b/include/mode.h
index 43b613fe..59930a60 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -175,7 +175,7 @@ void mode_set_config ( Mode *mode );
/**
* @param mode The mode to query
- * @param intput The input to process
+ * @param input The input to process
*
* This processes the input so it can be used for matching and sorting.
* This includes removing pango markup.
diff --git a/include/view.h b/include/view.h
index 09945ada..1a6a00fa 100644
--- a/include/view.h
+++ b/include/view.h
@@ -33,7 +33,6 @@ typedef enum
/**
* @param sw the Mode to show.
* @param input A pointer to a string where the inputted data is placed.
- * @param prompt The prompt to show.
* @param message Extra message to display.
* @param flags Flags indicating state of the menu.
* @param finalize the finailze callback
@@ -42,9 +41,7 @@ typedef enum
*
* @returns The command issued (see MenuReturn)
*/
-RofiViewState *rofi_view_create ( Mode *sw, const char *input, const char *message, MenuFlags flags, void ( *finalize )(
- RofiViewState * ) )
-__attribute__ ( ( nonnull ( 1, 2, 5 ) ) );
+RofiViewState *rofi_view_create ( Mode *sw, const char *input, const char *message, MenuFlags flags, void ( *finalize )( RofiViewState * ) ) __attribute__ ( ( nonnull ( 1, 2, 5 ) ) );
/**
* @param state The Menu Handle
@@ -53,10 +50,41 @@ __attribute__ ( ( nonnull ( 1, 2, 5 ) ) );
*/
void rofi_view_finalize ( RofiViewState *state );
+/**
+ * @param state the Menu handle
+ *
+ * Get the return value associated to the users action.
+ *
+ * @returns the return value
+ */
MenuReturn rofi_view_get_return_value ( const RofiViewState *state );
+/**
+ * @param state the Menu handle
+ *
+ * Returns the index of the next visible position.
+ *
+ * @return the next position.
+ */
unsigned int rofi_view_get_next_position ( const RofiViewState *state );
+/**
+ * @param state the Menu handle
+ * @param event the event to handle
+ * @param xkb the keyboard handle
+ *
+ * Process an Xevent.
+ */
void rofi_view_itterrate ( RofiViewState *state, xcb_generic_event_t *event, xkb_stuff *xkb );
+/**
+ * @param state the Menu handle
+ *
+ * @returns returns if this state is completed.
+ */
unsigned int rofi_view_get_completed ( const RofiViewState *state );
+/**
+ * @param state the Menu handle
+ *
+ * @returns the raw user input.
+ */
const char * rofi_view_get_user_input ( const RofiViewState *state );
/**
@@ -90,6 +118,12 @@ void rofi_view_restart ( RofiViewState *state );
*/
void rofi_view_update ( RofiViewState *state );
+/**
+ * @param state The handle to the view
+ * @param action The keyboard action
+ *
+ * @returns TRUE if action was handled.
+ */
gboolean rofi_view_trigger_action ( RofiViewState *state, KeyBindingAction action );
/**
@@ -185,7 +219,7 @@ void rofi_view_set_overlay ( RofiViewState *state, const char *text );
* @param menu_flags The state of the new window.
*
* Creates the internal 'Cached' window that gets reused between views.
- * @TODO: Internal call to view exposed.
+ * TODO: Internal call to view exposed.
*/
void __create_window ( MenuFlags menu_flags );
/** @} */
diff --git a/include/widgets/listview.h b/include/widgets/listview.h
index e04400d0..21ebe758 100644
--- a/include/widgets/listview.h
+++ b/include/widgets/listview.h
@@ -99,7 +99,7 @@ void listview_nav_up ( listview *lv );
*/
void listview_nav_down ( listview *lv );
/**
- * @param state The listview handle
+ * @param lv The listview handle
*
* Move the selection one column to the right.
* - No wrap around.
@@ -107,14 +107,14 @@ void listview_nav_down ( listview *lv );
*/
void listview_nav_right ( listview *lv );
/**
- * @param state The listview handle
+ * @param lv The listview handle
*
* Move the selection one column to the left.
* - No wrap around.
*/
void listview_nav_left ( listview *lv );
/**
- * @param state The listview handle
+ * @param lv The listview handle
*
* Move the selection one page down.
* - No wrap around.
@@ -123,7 +123,7 @@ void listview_nav_left ( listview *lv );
void listview_nav_page_next ( listview *lv );
/**
- * @param state The current RofiViewState
+ * @param lv The listview handle
*
* Move the selection one page up.
* - No wrap around.
@@ -202,7 +202,7 @@ void listview_set_scroll_type ( listview *lv, ScrollType type );
void listview_set_mouse_activated_cb ( listview *lv, listview_mouse_activated_cb cb, void *udata );
/**
* @param lv Handler to the listview object
- * @param enabled
+ * @param enable boolean to enable/disable multi-select
*
* Enable,disable multi-select.
*/
diff --git a/include/widgets/textbox.h b/include/widgets/textbox.h
index 0a051ff4..b40f3978 100644
--- a/include/widgets/textbox.h
+++ b/include/widgets/textbox.h
@@ -19,7 +19,7 @@
*/
/**
* Internal structure of a textbox widget.
- * @TODO make this internal to textbox
+ * TODO make this internal to textbox
*/
typedef struct
{
@@ -217,7 +217,7 @@ void textbox_delete ( textbox *tb, int pos, int dlen );
* @param h The new height of the textbox
*
* Move and resize the textbox.
- * @TODO remove for #widget_resize and #widget_move
+ * TODO remove for #widget_resize and #widget_move
*/
void textbox_moveresize ( textbox *tb, int x, int y, int w, int h );
/**
@@ -236,7 +236,7 @@ void textbox_set_pango_context ( PangoContext *p );
* @param tb Handle to the textbox
* @param list New pango attributes
*
- * Sets #list as active pango attributes.
+ * Sets list as active pango attributes.
*/
void textbox_set_pango_attributes ( textbox *tb, PangoAttrList *list );
diff --git a/include/widgets/widget-internal.h b/include/widgets/widget-internal.h
index f3cebe2e..a50f3980 100644
--- a/include/widgets/widget-internal.h
+++ b/include/widgets/widget-internal.h
@@ -40,7 +40,7 @@ struct _widget
/** widget clicked callback */
widget_clicked_cb clicked;
- /** user data for ::clicked callback */
+ /** user data for clicked callback */
void *clicked_cb_data;
/** Free widget callback */
diff --git a/include/widgets/widget.h b/include/widgets/widget.h
index 4fa4d953..ba7fa841 100644
--- a/include/widgets/widget.h
+++ b/include/widgets/widget.h
@@ -71,15 +71,15 @@ void widget_disable ( widget *widget );
void widget_enable ( widget *widget );
/**
- * @param tb Handle to the widget
- * @param draw The cairo object used to draw itself.
+ * @param widget tb Handle to the widget
+ * @param d The cairo object used to draw itself.
*
* Render the textbox.
*/
void widget_draw ( widget *widget, cairo_t *d );
/**
- * @param tb Handle to the widget
+ * @param widget Handle to the widget
*
* Free the widget and all allocated memory.
*/
@@ -137,7 +137,7 @@ void widget_update ( widget *widget );
*/
void widget_queue_redraw ( widget *widget );
/**
- * @param widget The widget handle
+ * @param wid The widget handle
*
* Check the flag indicating the widget needs to be redrawn.
*/
@@ -166,10 +166,10 @@ void widget_set_clicked_handler ( widget *wid, widget_clicked_cb cb, void *udata
/**
* @param wid The widget handle
- * @param xmd The motion notify object.
+ * @param xme The motion notify object.
*
* Motion notify.
- * @TODO make this like clicked with callback.
+ * TODO make this like clicked with callback.
* returns TRUE when handled.
*/
gboolean widget_motion_notify ( widget *wid, xcb_motion_notify_event_t *xme );
diff --git a/include/x11-helper.h b/include/x11-helper.h
index bc23e404..80a32689 100644
--- a/include/x11-helper.h
+++ b/include/x11-helper.h
@@ -27,7 +27,7 @@ char* window_get_text_prop ( xcb_window_t w, xcb_atom_t atom );
* @param w The xcb_window_t to set property on
* @param prop Atom of the property to change
* @param atoms List of atoms to change the property too
- * @param count The length of the #atoms list.
+ * @param count The length of the atoms list.
*
* Set property on window.
*/