summaryrefslogtreecommitdiffstats
path: root/include/dialogs
diff options
context:
space:
mode:
authorQC <qball@gmpclient.org>2015-02-12 22:26:28 +0100
committerQC <qball@gmpclient.org>2015-02-12 22:26:28 +0100
commitc760432a6c1d064a9a18ec57252a5f4bf6d46608 (patch)
tree6bc1fa0676429adad326a5165fff140f20fa4ac0 /include/dialogs
parent605fe4911cb1683624b48d895afe6b2630e0e529 (diff)
Moving files around, dialogs in dialog directory.
Diffstat (limited to 'include/dialogs')
-rw-r--r--include/dialogs/dmenu-dialog.h20
-rw-r--r--include/dialogs/run-dialog.h14
-rw-r--r--include/dialogs/script-dialog.h42
-rw-r--r--include/dialogs/ssh-dialog.h14
-rw-r--r--include/dialogs/window-dialog.h6
5 files changed, 96 insertions, 0 deletions
diff --git a/include/dialogs/dmenu-dialog.h b/include/dialogs/dmenu-dialog.h
new file mode 100644
index 00000000..8876cc97
--- /dev/null
+++ b/include/dialogs/dmenu-dialog.h
@@ -0,0 +1,20 @@
+#ifndef __DMENU_DIALOG_H__
+#define __DMENU_DIALOG_H__
+
+/**
+ * Prompt used in dmenu.
+ */
+extern char *dmenu_prompt;
+extern int dmenu_selected_line;
+
+
+/**
+ * @param input Pointer to the user-input string.
+ *
+ * dmenu dialog.
+ *
+ * @returns TRUE if script was successful.
+ */
+int dmenu_switcher_dialog ( char **input );
+
+#endif
diff --git a/include/dialogs/run-dialog.h b/include/dialogs/run-dialog.h
new file mode 100644
index 00000000..49701705
--- /dev/null
+++ b/include/dialogs/run-dialog.h
@@ -0,0 +1,14 @@
+#ifndef __RUN_DIALOG_H__
+#define __RUN_DIALOG_H__
+
+/**
+ * @param input Pointer to the user-input string.
+ * @param data Custom data pointer for callback.
+ *
+ * Run the run dialog
+ *
+ * @returns SwitcherMode selected by user.
+ */
+SwitcherMode run_switcher_dialog ( char **input, void *data );
+
+#endif
diff --git a/include/dialogs/script-dialog.h b/include/dialogs/script-dialog.h
new file mode 100644
index 00000000..effc8177
--- /dev/null
+++ b/include/dialogs/script-dialog.h
@@ -0,0 +1,42 @@
+#ifndef __SCRIPT_DIALOG_H__
+#define __SCRIPT_DIALOG_H__
+
+/**
+ * Structure holds the arguments for the script_switcher.
+ */
+typedef struct
+{
+ /** Prompt to display. */
+ char *name;
+ /** The script */
+ char *script_path;
+} ScriptOptions;
+
+
+/**
+ * @param input Pointer to the user-input string.
+ * @param data Custom data pointer for callback.
+ *
+ * Run the script dialog
+ *
+ * @returns SwitcherMode selected by user.
+ */
+SwitcherMode script_switcher_dialog ( char **input, void *data );
+
+/**
+ * @param str The input string to parse
+ *
+ * Parse an argument string into the right ScriptOptions data object.
+ * This is off format: <Name>:<Script>
+ *
+ * @returns NULL when it fails, a newly allocated ScriptOptions when successful.
+ */
+ScriptOptions *script_switcher_parse_setup ( const char *str );
+
+/**
+ * @param sw Handle to the ScriptOption
+ *
+ * Free the ScriptOptions block.
+ */
+void script_switcher_free_options ( void *data );
+#endif
diff --git a/include/dialogs/ssh-dialog.h b/include/dialogs/ssh-dialog.h
new file mode 100644
index 00000000..dac52006
--- /dev/null
+++ b/include/dialogs/ssh-dialog.h
@@ -0,0 +1,14 @@
+#ifndef __SSH_DIALOG_H__
+#define __SSH_DIALOG_H__
+
+/**
+ * @param input Pointer to the user-input string.
+ * @param data Custom data pointer for callback.
+ *
+ * Run the ssh dialog
+ *
+ * @returns SwitcherMode selected by user.
+ */
+SwitcherMode ssh_switcher_dialog ( char **input, void *data );
+
+#endif
diff --git a/include/dialogs/window-dialog.h b/include/dialogs/window-dialog.h
new file mode 100644
index 00000000..e6b6f727
--- /dev/null
+++ b/include/dialogs/window-dialog.h
@@ -0,0 +1,6 @@
+#ifndef __WINDOW_DIALOG_H__
+#define __WINDOW_DIALOG_H__
+
+SwitcherMode run_switcher_window ( char **input, G_GNUC_UNUSED void *data );
+
+#endif // __WINDOW_DIALOG_H__