mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 17:12:51 +02:00
Refactoring to avoid code duplication.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4344 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
9cdea0d608
commit
f57b551a86
4 changed files with 19 additions and 33 deletions
|
|
@ -1,23 +1,10 @@
|
||||||
#ifndef __CUIX_API_H
|
#ifndef __CUIX_API_H
|
||||||
#define __CUIX_API_H
|
#define __CUIX_API_H
|
||||||
|
|
||||||
#if defined(USE_NCURSES) && !defined(RENAMED_NCURSES)
|
#include "term-curses.h"
|
||||||
# include <ncurses.h>
|
|
||||||
#else
|
|
||||||
# include <curses.h>
|
|
||||||
#endif
|
|
||||||
#include <form.h>
|
|
||||||
#include <panel.h>
|
|
||||||
|
|
||||||
#define MAX_FIELD_SIZE 64
|
#define MAX_FIELD_SIZE 64
|
||||||
|
|
||||||
/* Should be updated if the one in term-curses.c changes */
|
|
||||||
struct _TERM_WINDOW {
|
|
||||||
int x, y;
|
|
||||||
int width, height;
|
|
||||||
WINDOW *win;
|
|
||||||
};
|
|
||||||
|
|
||||||
WINDOW *cuix_win;
|
WINDOW *cuix_win;
|
||||||
PANEL *p_main;
|
PANEL *p_main;
|
||||||
PANEL *p_cuix;
|
PANEL *p_cuix;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,6 @@
|
||||||
#ifndef __CUIX_LIB_H
|
#ifndef __CUIX_LIB_H
|
||||||
#define __CUIX_LIB_H
|
#define __CUIX_LIB_H
|
||||||
|
|
||||||
#if defined(USE_NCURSES) && !defined(RENAMED_NCURSES)
|
|
||||||
# include <ncurses.h>
|
|
||||||
#else
|
|
||||||
# include <curses.h>
|
|
||||||
#endif
|
|
||||||
#include <form.h>
|
|
||||||
#include <panel.h>
|
|
||||||
#include "cuix-api.h"
|
#include "cuix-api.h"
|
||||||
|
|
||||||
int home_menu (char *);
|
int home_menu (char *);
|
||||||
|
|
|
||||||
|
|
@ -26,13 +26,9 @@
|
||||||
#ifdef HAVE_CUIX
|
#ifdef HAVE_CUIX
|
||||||
#include "cuix.h"
|
#include "cuix.h"
|
||||||
#endif
|
#endif
|
||||||
#include "panel.h"
|
|
||||||
|
|
||||||
#if defined(USE_NCURSES) && !defined(RENAMED_NCURSES)
|
#include "term-curses.h"
|
||||||
# include <ncurses.h>
|
|
||||||
#else
|
|
||||||
# include <curses.h>
|
|
||||||
#endif
|
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
|
@ -48,12 +44,6 @@
|
||||||
# define _POSIX_VDISABLE 0
|
# define _POSIX_VDISABLE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct _TERM_WINDOW {
|
|
||||||
int x, y;
|
|
||||||
int width, height;
|
|
||||||
WINDOW *win;
|
|
||||||
};
|
|
||||||
|
|
||||||
TERM_WINDOW *root_window;
|
TERM_WINDOW *root_window;
|
||||||
|
|
||||||
static int curs_x, curs_y;
|
static int curs_x, curs_y;
|
||||||
|
|
|
||||||
16
src/fe-text/term-curses.h
Normal file
16
src/fe-text/term-curses.h
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#if defined(USE_NCURSES) && !defined(RENAMED_NCURSES)
|
||||||
|
# include <ncurses.h>
|
||||||
|
#else
|
||||||
|
# include <curses.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_CUIX
|
||||||
|
#include <form.h>
|
||||||
|
#include <panel.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct _TERM_WINDOW {
|
||||||
|
int x, y;
|
||||||
|
int width, height;
|
||||||
|
WINDOW *win;
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue