Add scr_getlogwinheight()
authorMikael Berthe <mikael@lilotux.net>
Tue, 23 Mar 2010 23:41:21 +0100
changeset 1819 d13315366ba5
parent 1818 4694fad35ed8
child 1820 0628dcecaddf
Add scr_getlogwinheight()
mcabber/mcabber/api.h
mcabber/mcabber/screen.c
mcabber/mcabber/screen.h
--- a/mcabber/mcabber/api.h	Tue Mar 23 16:47:18 2010 +0200
+++ b/mcabber/mcabber/api.h	Tue Mar 23 23:41:21 2010 +0100
@@ -3,7 +3,7 @@
 
 #include <mcabber/config.h> // For MCABBER_BRANCH
 
-#define MCABBER_API_VERSION 11
+#define MCABBER_API_VERSION 12
 #define MCABBER_API_MIN     11
 
 extern const gchar *mcabber_branch;
--- a/mcabber/mcabber/screen.c	Tue Mar 23 16:47:18 2010 +0200
+++ b/mcabber/mcabber/screen.c	Tue Mar 23 23:41:21 2010 +0100
@@ -869,6 +869,13 @@
   return maxY - Log_Win_Height - 3;
 }
 
+guint scr_getlogwinheight(void)
+{
+  if (Log_Win_Height >= 2)
+    return Log_Win_Height - 2;
+  return 0;
+}
+
 //  scr_print_logwindow(string)
 // Display the string in the log window.
 // Note: The string must be in the user's locale!
--- a/mcabber/mcabber/screen.h	Tue Mar 23 16:47:18 2010 +0200
+++ b/mcabber/mcabber/screen.h	Tue Mar 23 23:41:21 2010 +0100
@@ -125,6 +125,7 @@
 guint scr_getprefixwidth(void);
 guint scr_gettextwidth(void);
 guint scr_gettextheight(void);
+guint scr_getlogwinheight(void);
 void  scr_line_prefix(hbb_line *line, char *prefix, guint preflen);
 
 void scr_beep(void);