aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/AsyncTask.hpp9
-rw-r--r--include/Body.hpp3
-rw-r--r--include/Program.hpp (renamed from include/Program.h)16
-rw-r--r--include/QuickMedia.hpp1
4 files changed, 17 insertions, 12 deletions
diff --git a/include/AsyncTask.hpp b/include/AsyncTask.hpp
new file mode 100644
index 0000000..81be1ee
--- /dev/null
+++ b/include/AsyncTask.hpp
@@ -0,0 +1,9 @@
+#pragma once
+
+#include <functional>
+#include <deque>
+#include <mutex>
+
+namespace QuickMedia {
+
+} \ No newline at end of file
diff --git a/include/Body.hpp b/include/Body.hpp
index 9cdcd7b..1dc1fe8 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -147,14 +147,13 @@ namespace QuickMedia {
// Select next item, ignoring invisible items. Returns true if the item was changed. This can be used to check if the bottom was hit when wrap_around is set to false
bool select_next_item();
- void set_selected_item(int item);
+ void set_selected_item(int item, bool reset_prev_selected_item = true);
// Returns -1 if item can't be found
int get_index_by_body_item(BodyItem *body_item);
void select_first_item();
void select_last_item();
- void reset_selected();
void clear_items();
void prepend_items(BodyItems new_items);
void append_items(BodyItems new_items);
diff --git a/include/Program.h b/include/Program.hpp
index cab8d26..8ac2d2d 100644
--- a/include/Program.h
+++ b/include/Program.hpp
@@ -1,11 +1,8 @@
-#ifndef QUICKMEDIA_PROGRAM_H
-#define QUICKMEDIA_PROGRAM_H
+#ifndef QUICKMEDIA_PROGRAM_HPP
+#define QUICKMEDIA_PROGRAM_HPP
#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <thread>
typedef struct {
pid_t pid;
@@ -41,8 +38,7 @@ int wait_program_non_blocking(pid_t process_id, int *status);
*/
int exec_program_async(const char **args, pid_t *result_process_id);
-#ifdef __cplusplus
-}
-#endif
+void program_clear_current_thread();
+void program_kill_in_thread(const std::thread::id &thread_id);
-#endif
+#endif /* QUICKMEDIA_PROGRAM_HPP */
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index 99bab7a..6f8e3ff 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -63,6 +63,7 @@ namespace QuickMedia {
void image_board_thread_page(ImageBoardThreadPage *thread_page, Body *thread_body);
void chat_login_page();
void chat_page(MatrixChatPage *chat_page, RoomData *current_room);
+ void after_matrix_login_page();
enum class LoadImageResult {
OK,