home · contact · privacy
Server: Remove log_help(), this should be serverd by the client.
[plomrogue] / src / client / windows.h
index 1708fab1432b31f1bac6b1aef0acd8e0e41ac319..91f3f7bf454ee33142a9e893f11c23bb0b35713b 100644 (file)
@@ -1,4 +1,8 @@
 /* src/client/windows.h
+ *
+ * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
+ * or any later version. For details on its copyright, license, and warranties,
+ * see the file NOTICE in the root directory of the PlomRogue source package.
  *
  * A tiled window manager for the terminal.
  *
 
 #include <ncurses.h> /* WINDOW, chtype */
 #include <stdint.h> /* uint8_t, int16_t, uint16_t, uint32_t */
-#include "../common/yx_uint16.h" /* yx_uint16 struct */
 #include "keybindings.h" /* struct KeyBindingDB */
 
 
 
+struct yx_uint16
+{
+    uint16_t y;
+    uint16_t x;
+};
+
 struct WinDB
 {
     WINDOW * t_screen; /* ncurses' pointer to the terminal screen */
@@ -51,7 +60,7 @@ struct Win
     struct yx_uint16 target_center; /* saves .center when toggling .view */
     struct yx_uint16 frame_size; /* size of window/frame to see winmap through*/
     struct yx_uint16 start; /* upper left corner of window in v_screen */
-    struct yx_uint16 center; /* winnap cell to center frame on if < winmap */
+    struct yx_uint16 center; /* winmap cell to center frame on if < winmap */
     struct yx_uint16 winmap_size; /* delimits .winmap, sorts it into lines */
     chtype * winmap; /* window content in sequence of chtype's to write */
     int16_t target_height; /* window size / .frame_size description in config */
@@ -78,27 +87,6 @@ extern uint16_t center_offset(uint16_t position,
 /* Get Win of "id". */
 extern struct Win * get_win_by_id(char id);
 
-/* Read/write individual Win (identified by "c") and world.winDB.order /
- * world.winDB.active from/to "file" up to the world.delim delimiter. Use "line"
- * and "linemax" as expected by try_fgets().
- *
- * Note that read_winconf_from_file() returns 1 on success and 0 if it detects
- * having found the end of the valid interface configuration file by either
- * hitting a EOF or a newline (so empty newlines at the end of the file are ok).
- *
- * Note that read_order_wins_visible_active() only reads the promised values
- * into pointers for temporary storage. This is due to the order in which window
- * data is initialized: winDB.order and winDB.active should only be set when all
- * windows have been initialized, so cleaning up on error is not confused.
- */
-extern uint8_t read_winconf_from_file(char * line, uint32_t linemax,
-                                      FILE * file);
-extern void write_winconf_of_id_to_file(FILE * file, char c);
-extern void read_order_wins_visible_active(char * line, uint32_t linemax,
-                                           FILE * file, char ** tmp_order,
-                                           char * tmp_active);
-extern void write_order_wins_visible_active(FILE * file);
-
 /* Builds virtual sreen from .t_screen's size, fits win's sizes to them.*/
 extern void make_v_screen_and_init_win_sizes();