Cim5-Architecture

From CenterIM

Jump to: navigation, search

This page describes basic CenterIM 5 architecture.

Contents

Architecture

CenterIM 5 is an object oriented program written in C++. It consists of several components that are shown at the picture below. Grey parts are external libraries, white parts represent components that are developed in this project. Libsigc++ provides a typesafe callback system, libtermkey is used as low level input processing library, ncurses allows us to draw widgets on the screen, libpurple provides a communication backend, GLib is a general purpose library.

Cim5-components.png

Notes

Here are some useful notes:

  • Widgets cannot be displayed on the screen by themselves. The *only* widgets which can be drawn on the screen are Windows and derived classes. The idea behind this lies in the details of the curses implementation (see man newpad).
  • Cim5 works internally with UTF-8 exclusively. Input is converted from the current locale to UTF-8. This stems from the fact that glib (used by libpurple) expects UTF-8 encoded strings.

CppConsUi

CppConsUI is a TUI toolkit. The goal of this library is to provide easy to use widgets to build user interface.

Cim5-cppconsui.png

TODO classes description

CenterIM

Top layer of CenterIM 5 is a relatively simple glue between CppConsUI and libpurple. Libpurple is a C based instant messaging API. As such Cim5 represents core libpurple interfaces as objects. For example libpurple has a conversation API. In Cim5 this is represented by the Conversation and Conversations classes.

TODO implementation files description

Personal tools