changeset 1791:6e0a8bfb3a01

Add scr_gettextheight()
author Myhailo Danylenko <isbear@ukrpost.net>
date Mon, 15 Mar 2010 00:47:39 +0200
parents a1d987cc1a4d
children 572a635234e0
files mcabber/mcabber/api.h mcabber/mcabber/screen.c mcabber/mcabber/screen.h
diffstat 3 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/mcabber/api.h	Sun Mar 14 23:21:20 2010 +0100
+++ b/mcabber/mcabber/api.h	Mon Mar 15 00:47:39 2010 +0200
@@ -3,7 +3,7 @@
 
 #include <mcabber/config.h> // For MCABBER_BRANCH
 
-#define MCABBER_API_VERSION 6
+#define MCABBER_API_VERSION 7
 #define MCABBER_API_MIN     4
 
 extern const gchar *mcabber_branch;
--- a/mcabber/mcabber/screen.c	Sun Mar 14 23:21:20 2010 +0100
+++ b/mcabber/mcabber/screen.c	Mon Mar 15 00:47:39 2010 +0200
@@ -859,6 +859,12 @@
   return maxX - Roster_Width - scr_getprefixwidth();
 }
 
+guint scr_gettextheight(void)
+{
+  // log window, two status bars and one input line
+  return maxY - Log_Win_Height - 3;
+}
+
 //  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	Sun Mar 14 23:21:20 2010 +0100
+++ b/mcabber/mcabber/screen.h	Mon Mar 15 00:47:39 2010 +0200
@@ -122,6 +122,7 @@
 
 guint scr_getprefixwidth(void);
 guint scr_gettextwidth(void);
+guint scr_gettextheight(void);
 void  scr_line_prefix(hbb_line *line, char *prefix, guint preflen);
 
 void scr_beep(void);