summaryrefslogtreecommitdiffstats
path: root/include/dialogs
diff options
context:
space:
mode:
authorQC <qball@gmpclient.org>2015-03-27 20:28:53 +0100
committerQC <qball@gmpclient.org>2015-03-27 20:28:53 +0100
commitb21368c005ac7349ed1ade37512a864a494477ee (patch)
treeb11c9fdb2745dad04de81ca4a8047c05ac160289 /include/dialogs
parentf52b697dd4a4d973ee9223960baa8f7c00977324 (diff)
OO-ify the Switchers.
Diffstat (limited to 'include/dialogs')
-rw-r--r--include/dialogs/run.h11
-rw-r--r--include/dialogs/script.h30
-rw-r--r--include/dialogs/ssh.h11
-rw-r--r--include/dialogs/window.h3
4 files changed, 4 insertions, 51 deletions
diff --git a/include/dialogs/run.h b/include/dialogs/run.h
index 49701705..c95944f4 100644
--- a/include/dialogs/run.h
+++ b/include/dialogs/run.h
@@ -1,14 +1,5 @@
#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 );
-
+extern Switcher run_mode;
#endif
diff --git a/include/dialogs/script.h b/include/dialogs/script.h
index effc8177..fed5189b 100644
--- a/include/dialogs/script.h
+++ b/include/dialogs/script.h
@@ -1,27 +1,6 @@
#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
@@ -31,12 +10,5 @@ SwitcherMode script_switcher_dialog ( char **input, void *data );
*
* @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 );
+Switcher *script_switcher_parse_setup ( const char *str );
#endif
diff --git a/include/dialogs/ssh.h b/include/dialogs/ssh.h
index dac52006..d6fbe572 100644
--- a/include/dialogs/ssh.h
+++ b/include/dialogs/ssh.h
@@ -1,14 +1,5 @@
#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 );
-
+extern Switcher ssh_mode;
#endif
diff --git a/include/dialogs/window.h b/include/dialogs/window.h
index e6b6f727..af582596 100644
--- a/include/dialogs/window.h
+++ b/include/dialogs/window.h
@@ -1,6 +1,5 @@
#ifndef __WINDOW_DIALOG_H__
#define __WINDOW_DIALOG_H__
-SwitcherMode run_switcher_window ( char **input, G_GNUC_UNUSED void *data );
-
+extern Switcher window_mode;
#endif // __WINDOW_DIALOG_H__