Example #1
0
void
syms_of_xftfont (void)
{
  DEFSYM (Qxft, "xft");
  DEFSYM (QChinting, ":hinting");
  DEFSYM (QCautohint, ":autohint");
  DEFSYM (QChintstyle, ":hintstyle");
  DEFSYM (QCrgba, ":rgba");
  DEFSYM (QCembolden, ":embolden");
  DEFSYM (QClcdfilter, ":lcdfilter");

  ascii_printable[0] = 0;

  xftfont_driver = ftfont_driver;
  xftfont_driver.type = Qxft;
  xftfont_driver.get_cache = xfont_driver.get_cache;
  xftfont_driver.list = xftfont_list;
  xftfont_driver.match = xftfont_match;
  xftfont_driver.open = xftfont_open;
  xftfont_driver.close = xftfont_close;
  xftfont_driver.prepare_face = xftfont_prepare_face;
  xftfont_driver.done_face = xftfont_done_face;
  xftfont_driver.has_char = xftfont_has_char;
  xftfont_driver.encode_char = xftfont_encode_char;
  xftfont_driver.text_extents = xftfont_text_extents;
  xftfont_driver.draw = xftfont_draw;
  xftfont_driver.end_for_frame = xftfont_end_for_frame;
  xftfont_driver.cached_font_ok = xftfont_cached_font_ok;
#if defined (HAVE_M17N_FLT) && defined (HAVE_LIBOTF)
  xftfont_driver.shape = xftfont_shape;
#endif

  register_font_driver (&xftfont_driver, NULL);
}
Example #2
0
SCM_EXTENSION_ENTRY void Scm_Init_gauche__termios(void)
{
    ScmModule *mod;
    SCM_INIT_EXTENSION(gauche__termios);
    mod = SCM_FIND_MODULE("gauche.termios", SCM_FIND_MODULE_CREATE);
    Scm_Init_termiolib(mod);

#if !defined(GAUCHE_WINDOWS)
    Scm_InitStaticClass(&Scm_SysTermiosClass, "<sys-termios>", mod,
                        termios_slots, 0);

    /* Constants for termios.  Non-POSIX symbols are guarded by #ifdef's */
#define DEFSYM(sym) \
    SCM_DEFINE(mod, #sym, Scm_MakeIntegerFromUI(sym))

    /* c_iflag masks */
    DEFSYM(IGNBRK);
    DEFSYM(BRKINT);
    DEFSYM(IGNPAR);
    DEFSYM(PARMRK);
    DEFSYM(INPCK);
    DEFSYM(ISTRIP);
    DEFSYM(INLCR);
    DEFSYM(IGNCR);
    DEFSYM(ICRNL);
    DEFSYM(IXON);
    DEFSYM(IXOFF);
#ifdef IXANY
    DEFSYM(IXANY);
#endif
#ifdef IUCLC
    DEFSYM(IUCLC);
#endif
#ifdef IMAXBEL
    DEFSYM(IMAXBEL);
#endif

    /* c_oflag masks */
    DEFSYM(OPOST);
#ifdef OLCUC
    DEFSYM(OLCUC);
#endif
#ifdef ONLCR
    DEFSYM(ONLCR);
#endif
#ifdef OCRNL
    DEFSYM(OCRNL);
#endif
#ifdef ONOCR
    DEFSYM(ONOCR);
#endif
#ifdef ONLRET
    DEFSYM(ONLRET);
#endif
#ifdef OFILL
    DEFSYM(OFILL);
#endif
#ifdef OFDEL
    DEFSYM(OFDEL);
#endif
#ifdef NLDLY
    DEFSYM(NLDLY);
#endif
#ifdef NL0
    DEFSYM(NL0);
#endif
#ifdef NL1
    DEFSYM(NL1);
#endif
#ifdef CRDLY
    DEFSYM(CRDLY);
#endif
#ifdef CR0
    DEFSYM(CR0);
#endif
#ifdef CR1
    DEFSYM(CR1);
#endif
#ifdef CR2
    DEFSYM(CR2);
#endif
#ifdef CR3
    DEFSYM(CR3);
#endif
#ifdef BSDLY
    DEFSYM(BSDLY);
#endif
#ifdef BS0
    DEFSYM(BS0);
#endif
#ifdef BS1
    DEFSYM(BS1);
#endif
#ifdef VTDLY
    DEFSYM(VTDLY);
#endif
#ifdef VT0
    DEFSYM(VT0);
#endif
#ifdef VT1
    DEFSYM(VT1);
#endif
#ifdef FFDLY
    DEFSYM(FFDLY);
#endif
#ifdef FF0
    DEFSYM(FF0);
#endif
#ifdef FF1
    DEFSYM(FF1);
#endif

    /* c_cflag masks */
    DEFSYM(CLOCAL);
    DEFSYM(CREAD);
    DEFSYM(CSIZE);
    DEFSYM(CS5);
    DEFSYM(CS6);
    DEFSYM(CS7);
    DEFSYM(CS8);
    DEFSYM(CSTOPB);
    DEFSYM(HUPCL);
    DEFSYM(PARENB);
    DEFSYM(PARODD);
#ifdef CIBAUD
    DEFSYM(CIBAUD);
#endif
#ifdef CRTSCTS
    DEFSYM(CRTSCTS);
#endif

    /* c_lflag masks */
    DEFSYM(ECHO);
    DEFSYM(ECHOE);
    DEFSYM(ECHOK);
    DEFSYM(ECHONL);
    DEFSYM(ICANON);
    DEFSYM(ISIG);
    DEFSYM(NOFLSH);
    DEFSYM(TOSTOP);
    DEFSYM(IEXTEN);
#ifdef XCASE
    DEFSYM(XCASE);
#endif
#ifdef ECHOCTL
    DEFSYM(ECHOCTL);
#endif
#ifdef ECHOPRT
    DEFSYM(ECHOPRT);
#endif
#ifdef ECHOKE
    DEFSYM(ECHOKE);
#endif
#ifdef FLUSH0
    DEFSYM(FLUSH0);
#endif
#ifdef PENDIN
    DEFSYM(PENDIN);
#endif

    /* c_cc size */
    DEFSYM(NCCS);

    /* disable character */
    DEFSYM(_POSIX_VDISABLE);

    /* c_cc subscripts */
    DEFSYM(VEOF);
    DEFSYM(VEOL);
    DEFSYM(VERASE);
    DEFSYM(VINTR);
    DEFSYM(VKILL);
    DEFSYM(VMIN);
    DEFSYM(VQUIT);
    DEFSYM(VSTART);
    DEFSYM(VSTOP);
    DEFSYM(VSUSP);
    DEFSYM(VTIME);
#ifdef VDISCARD
    DEFSYM(VDISCARD);
#endif
#ifdef VDSUSP
    DEFSYM(VDSUSP);
#endif
#ifdef EOL2
    DEFSYM(VEOL2);
#endif
#ifdef LNEXT
    DEFSYM(VLNEXT);
#endif
#ifdef VREPRINT
    DEFSYM(VREPRINT);
#endif
#ifdef VSTATUS
    DEFSYM(VSTATUS);
#endif
#ifdef WERASE
    DEFSYM(VWERASE);
#endif
#ifdef VSWTCH
    DEFSYM(VSWTCH);
#endif
#ifdef VSWTC
    DEFSYM(VSWTC);
#endif

    /* extra baudrates.   <= B38400 is defined in termiolib.stub */
#ifdef B57600
    DEFSYM(B57600);
#endif
#ifdef B115200
    DEFSYM(B115200);
#endif
#ifdef B230400
    DEFSYM(B230400);
#endif

#endif /*!GAUCHE_WINDOWS*/
}