about summary refs log tree commit diff stats
path: root/src/ui/win_types.h
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-07-07 13:53:30 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-07-07 13:53:30 +0200
commita4cadf78faabc157e5db00e42302d495bba432c0 (patch)
tree6ff212e24fe750b04b37ca66c418fe366c5e5fd4 /src/ui/win_types.h
parent28fde3cd0129202d586cb4c24877a3e3f55ca582 (diff)
downloadprofani-tty-a4cadf78faabc157e5db00e42302d495bba432c0.tar.gz
Revert "Apply coding style"
This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2.

Sorting the includes creates some problems.
Diffstat (limited to 'src/ui/win_types.h')
-rw-r--r--src/ui/win_types.h138
1 files changed, 62 insertions, 76 deletions
diff --git a/src/ui/win_types.h b/src/ui/win_types.h
index 580c6596..cb6834c6 100644
--- a/src/ui/win_types.h
+++ b/src/ui/win_types.h
@@ -38,8 +38,8 @@
 
 #include "config.h"
 
-#include <glib.h>
 #include <wchar.h>
+#include <glib.h>
 
 #ifdef HAVE_NCURSESW_NCURSES_H
 #include <ncursesw/ncurses.h>
@@ -51,13 +51,13 @@
 #include "ui/buffer.h"
 #include "xmpp/chat_state.h"
 
-#define LAYOUT_SPLIT_MEMCHECK   12345671
-#define PROFCHATWIN_MEMCHECK    22374522
-#define PROFMUCWIN_MEMCHECK     52345276
-#define PROFPRIVATEWIN_MEMCHECK 77437483
-#define PROFCONFWIN_MEMCHECK    64334685
-#define PROFXMLWIN_MEMCHECK     87333463
-#define PROFPLUGINWIN_MEMCHECK  43434777
+#define LAYOUT_SPLIT_MEMCHECK       12345671
+#define PROFCHATWIN_MEMCHECK        22374522
+#define PROFMUCWIN_MEMCHECK         52345276
+#define PROFPRIVATEWIN_MEMCHECK     77437483
+#define PROFCONFWIN_MEMCHECK        64334685
+#define PROFXMLWIN_MEMCHECK         87333463
+#define PROFPLUGINWIN_MEMCHECK      43434777
 
 typedef enum {
     FIELD_HIDDEN,
@@ -73,33 +73,30 @@ typedef enum {
     FIELD_UNKNOWN
 } form_field_type_t;
 
-typedef struct form_option_t
-{
-    char* label;
-    char* value;
+typedef struct form_option_t {
+    char *label;
+    char *value;
 } FormOption;
 
-typedef struct form_field_t
-{
-    char* label;
-    char* type;
+typedef struct form_field_t {
+    char *label;
+    char *type;
     form_field_type_t type_t;
-    char* var;
-    char* description;
+    char *var;
+    char *description;
     gboolean required;
-    GSList* values;
-    GSList* options;
+    GSList *values;
+    GSList *options;
     Autocomplete value_ac;
 } FormField;
 
-typedef struct data_form_t
-{
-    char* type;
-    char* title;
-    char* instructions;
-    GSList* fields;
-    GHashTable* var_to_tag;
-    GHashTable* tag_to_var;
+typedef struct data_form_t {
+    char *type;
+    char *title;
+    char *instructions;
+    GSList *fields;
+    GHashTable *var_to_tag;
+    GHashTable *tag_to_var;
     Autocomplete tag_ac;
     gboolean modified;
 } DataForm;
@@ -109,24 +106,21 @@ typedef enum {
     LAYOUT_SPLIT
 } layout_type_t;
 
-typedef struct prof_layout_t
-{
+typedef struct prof_layout_t {
     layout_type_t type;
-    WINDOW* win;
+    WINDOW *win;
     ProfBuff buffer;
     int y_pos;
     int paged;
 } ProfLayout;
 
-typedef struct prof_layout_simple_t
-{
+typedef struct prof_layout_simple_t {
     ProfLayout base;
 } ProfLayoutSimple;
 
-typedef struct prof_layout_split_t
-{
+typedef struct prof_layout_split_t {
     ProfLayout base;
-    WINDOW* subwin;
+    WINDOW *subwin;
     int sub_y_pos;
     unsigned long memcheck;
 } ProfLayoutSplit;
@@ -141,95 +135,87 @@ typedef enum {
     WIN_PLUGIN
 } win_type_t;
 
-typedef struct prof_win_t
-{
+typedef struct prof_win_t {
     win_type_t type;
-    ProfLayout* layout;
+    ProfLayout *layout;
     Autocomplete urls_ac;
 } ProfWin;
 
-typedef struct prof_console_win_t
-{
+typedef struct prof_console_win_t {
     ProfWin window;
 } ProfConsoleWin;
 
-typedef struct prof_chat_win_t
-{
+typedef struct prof_chat_win_t {
     ProfWin window;
-    char* barejid;
+    char *barejid;
     int unread;
-    ChatState* state;
+    ChatState *state;
     gboolean is_otr;
     gboolean otr_is_trusted;
     gboolean pgp_send;
     gboolean pgp_recv;
     gboolean is_omemo;
-    gboolean is_ox; // XEP-0373: OpenPGP for XMPP
-    char* resource_override;
+    gboolean is_ox;     // XEP-0373: OpenPGP for XMPP
+    char *resource_override;
     gboolean history_shown;
     unsigned long memcheck;
-    char* enctext;
-    char* incoming_char;
-    char* outgoing_char;
+    char *enctext;
+    char *incoming_char;
+    char *outgoing_char;
     // For LMC
-    char* last_message;
-    char* last_msg_id;
+    char *last_message;
+    char *last_msg_id;
 } ProfChatWin;
 
-typedef struct prof_muc_win_t
-{
+typedef struct prof_muc_win_t {
     ProfWin window;
-    char* roomjid;
-    char* room_name;
+    char *roomjid;
+    char *room_name;
     int unread;
     gboolean unread_mentions;
     gboolean unread_triggers;
     gboolean showjid;
     gboolean is_omemo;
     unsigned long memcheck;
-    char* enctext;
-    char* message_char;
-    GDateTime* last_msg_timestamp;
+    char *enctext;
+    char *message_char;
+    GDateTime *last_msg_timestamp;
     // For LMC
-    char* last_message;
-    char* last_msg_id;
+    char *last_message;
+    char *last_msg_id;
 } ProfMucWin;
 
 typedef struct prof_conf_win_t ProfConfWin;
-typedef void (*ProfConfWinCallback)(ProfConfWin*);
+typedef void (*ProfConfWinCallback)(ProfConfWin *);
 
-struct prof_conf_win_t
-{
+struct prof_conf_win_t {
     ProfWin window;
-    char* roomjid;
-    DataForm* form;
+    char *roomjid;
+    DataForm *form;
     unsigned long memcheck;
     ProfConfWinCallback submit;
     ProfConfWinCallback cancel;
-    const void* userdata;
+    const void *userdata;
 };
 
-typedef struct prof_private_win_t
-{
+typedef struct prof_private_win_t {
     ProfWin window;
-    char* fulljid;
+    char *fulljid;
     int unread;
     unsigned long memcheck;
     gboolean occupant_offline;
     gboolean room_left;
 } ProfPrivateWin;
 
-typedef struct prof_xml_win_t
-{
+typedef struct prof_xml_win_t {
     ProfWin window;
     unsigned long memcheck;
 } ProfXMLWin;
 
-typedef struct prof_plugin_win_t
-{
+typedef struct prof_plugin_win_t {
     ProfWin window;
-    char* tag;
-    char* plugin_name;
+    char *tag;
+    char *plugin_name;
     unsigned long memcheck;
 } ProfPluginWin;