Sha256: 923be9fd2bf75251b6f3b6fcb541d4b94532d04c5c0143073c58e5cdb0ca45bd

Contents?: true

Size: 1.79 KB

Versions: 11

Compression:

Stored size: 1.79 KB

Contents

/*
 * This is a curses menu wrapper as part of ncurses-ruby.
 * It borrows heavily from form_wrap.h. 
 * Contributed by Earle Clubb <eclubb@valcom.com>
 * Valcom Inc. <http://www.valcom.com>
 * Copyright 2007
 * 
 *  This module is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2 of the License, or (at your option) any later version.
 *
 *  This module is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this module; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 *
 * Changes
 * (C) 2011 Tobias Herzke
 */

#if !defined(MENU_HH) && (defined(HAVE_MENU_H) || defined(HAVE_NCURSESW_MENU_H))
#define MENU_HH

#ifdef HAVE_MENU_H
#include <menu.h>
#else
#include <ncursesw/menu.h>
#endif
#include <ruby.h>

extern VALUE mMenu;
extern VALUE cITEM;
extern VALUE cMENU;

#define MENU_DEF_CONST(name) \
 rb_define_const(mMenu, #name, INT2NUM(name));

#define MENU_SNG_FUNC(name, nargs) \
  rb_define_singleton_method(mMenu, #name, &rbncurs_m_ ## name, nargs)

#define RB_CLASS_METH(class, alt_name, name, nargs)                  \
  rb_define_method(class, #name, (&rbncurs_c_ ## name), nargs);      \
  if (alt_name != NULL)                                              \
  	rb_define_method(class, alt_name, (&rbncurs_c_ ## name), nargs); \

//void init_menu_req_constants(void);
//void init_menu_opts_constants(void);
void init_menu(void);

#endif

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ncursesw-1.4.10 menu_wrap.h
ncursesw-1.4.9 menu_wrap.h
ncursesw-1.4.8 menu_wrap.h
ncursesw-1.4.7 menu_wrap.h
ncursesw-1.4.6 menu_wrap.h
ncursesw-1.4.5 menu_wrap.h
ncursesw-1.4.4 menu_wrap.h
ncursesw-1.4.3 menu_wrap.h
ncursesw-1.4.2 menu_wrap.h
ncursesw-1.4.1 menu_wrap.h
ncursesw-1.4.0.0 menu_wrap.h