[Aptitude-svn-commit] r3505 - in branches/aptitude-0.3/aptitude: . src/vscreen
Daniel Burrows
dburrows@costa.debian.org
Wed, 29 Jun 2005 17:41:57 +0000
Author: dburrows
Date: Wed Jun 29 17:41:54 2005
New Revision: 3505
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/vscreen/curses++.h
branches/aptitude-0.3/aptitude/src/vscreen/vscreen_widget.h
Log:
Expose *add_wch.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Wed Jun 29 17:41:54 2005
@@ -1,3 +1,9 @@
+2005-06-29 Daniel Burrows <dburrows@debian.org>
+
+ * src/vscreen/curses++.h, src/vscreen/vscreen_widget.h:
+
+ Expose the add_wch and wadd_wch functions.
+
2005-06-28 Daniel Burrows <dburrows@debian.org>
* src/vscreen/vs_editline.cc:
Modified: branches/aptitude-0.3/aptitude/src/vscreen/curses++.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/curses++.h (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/curses++.h Wed Jun 29 17:41:54 2005
@@ -447,6 +447,25 @@
int addch(chtype ch) {return waddch(win, ch);}
int mvaddch(int y, int x, chtype ch) {return mvwaddch(win, y, x, ch);}
+ int add_wch(wchar_t wch, attr_t attrs)
+ {
+ wchar_t tmp[2];
+ tmp[0]=wch;
+ tmp[1]=0;
+
+ cchar_t cch;
+ if(setcchar(&cch, tmp, attrs, PAIR_NUMBER(attrs), 0)==ERR)
+ return ERR;
+ else
+ return wadd_wch(win, &cch);
+ }
+
+ int mvadd_wch(int y, int x, wchar_t wch, attr_t attrs)
+ {
+ move(y, x);
+ return add_wch(wch, attrs);
+ }
+
int addstr(const std::wstring &str) {return addstr(str.c_str());}
int addnstr(const std::wstring &str, int n) {return addnstr(str.c_str(), n);}
int mvaddstr(int y, int x, const std::wstring &str) {return mvaddstr(y, x, str.c_str());}
Modified: branches/aptitude-0.3/aptitude/src/vscreen/vscreen_widget.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/vscreen/vscreen_widget.h (original)
+++ branches/aptitude-0.3/aptitude/src/vscreen/vscreen_widget.h Wed Jun 29 17:41:54 2005
@@ -266,6 +266,16 @@
int addch(chtype ch) {return win?win.addch(ch):0;}
int mvaddch(int y, int x, chtype ch) {return win?win.mvaddch(y,x,ch):0;}
+ int add_wch(wchar_t wch, const style &st)
+ {
+ return win?win.add_wch(wch, st.get_attrs()):0;
+ }
+
+ int mvadd_wch(int y, int x, wchar_t wch, const style &st)
+ {
+ return win?win.mvadd_wch(y, x, wch, st.get_attrs()):0;
+ }
+
int addstr(const char *str) {return win?win.addstr(str):0;}
int addnstr(const char *str, int n) {return win?win.addnstr(str, n):0;}
int mvaddstr(int y, int x, const char *str) {return win?win.mvaddstr(y, x, str):0;}