реклама на сайте
подробности

 
 
4 страниц V  < 1 2 3 4 >  
Reply to this topicStart new topic
> Графика для Linux., Выбор инструментов для созданя несложного GUI.
Logout
сообщение Jun 1 2008, 21:32
Сообщение #16





Группа: Новичок
Сообщений: 7
Регистрация: 23-05-08
Пользователь №: 37 765



Цитата(Maddy @ May 29 2008, 23:24) *
это реально 2 ветка ? брось каку - возьми 3 хотя-б , лучше 4 но тут смотреть надо что лучше к задече подходит .... она приятнее(4) но и более массивная ....
по qt тут можно поспрошать wink.gif

С qt2 вроде всё получается и смотрится неплохо. Народ, конечно, в быту привык к лучшему (телефоны, комьютеры), но для производства годится. Не делвть же ещё им сменные обои! Однако 3 версию попробую прикрутить. На х11 я примерчик сделал, и qmake мне больше нравится, чем руками маке лабать. Хотя может у qt2 своя утилита есть аналогичная?

Цитата(Cont @ May 29 2008, 23:29) *
Пришлось однажды использовать Nano-X. В качестве элементарного GUI сойдет (кнопки, простейшие окошки). Размер 100кб, правда проект уже довольно давно не развивается. Включен в дистрибутив uClinux.
Почему никто не предложил использовать библиотеку GTK? По-моему неплохая альтернатива QT

А GTK под фрейм-буфер можно конфигурировать? Если да, то где можно посмотреть рецепты?
Go to the top of the page
 
+Quote Post
Cont
сообщение Jun 2 2008, 06:21
Сообщение #17


Частый гость
**

Группа: Участник
Сообщений: 112
Регистрация: 10-11-06
Из: Москва
Пользователь №: 22 176



То что GTK можно сконфигурировать под фреймбуфер - это точно, к сожалению работал с GTK давно, и уже не помню где брал доку на эту тему. Посмотрите на оф. сайте.
Go to the top of the page
 
+Quote Post
Very_hard
сообщение Jun 3 2008, 06:40
Сообщение #18


Частый гость
**

Группа: Свой
Сообщений: 183
Регистрация: 10-02-06
Из: Киев, Украина
Пользователь №: 14 188



Может быть DirectFB (GTK+DirectFB)?
directfb.org
Go to the top of the page
 
+Quote Post
Johny
сообщение Jul 5 2008, 18:40
Сообщение #19


Частый гость
**

Группа: Свой
Сообщений: 140
Регистрация: 18-10-05
Пользователь №: 9 792



Цитата(Harbour @ May 25 2008, 13:55) *
www.fltk.org


а под ucLinux-ом эта штука работает?
А то я подумываю с PXA на blackfin проект перевести и с microwindows на fltk.
Microwindows (он же nano-X) умер не успев родиться, там даже truetype шрифты не работают.
Go to the top of the page
 
+Quote Post
Harbour
сообщение Jul 6 2008, 05:37
Сообщение #20


Местами Гуру
*****

Группа: Validating
Сообщений: 1 103
Регистрация: 5-12-04
Пользователь №: 1 323



дык а чего бы ему не работать ? есть интересный порт на DirectFB Никиты Егорова, см. :

http://www.mail-archive.com/fltk-dev@easys...m/msg00762.html
Go to the top of the page
 
+Quote Post
Ixt
сообщение Jul 14 2008, 15:19
Сообщение #21


Частый гость
**

Группа: Свой
Сообщений: 76
Регистрация: 27-10-06
Из: Брянск
Пользователь №: 21 724



Цитата(Logout @ Jun 2 2008, 01:32) *
На х11 я примерчик сделал, и qmake мне больше нравится, чем руками маке лабать. Хотя может у qt2 своя утилита есть аналогичная?

На 2-ой QT-е есть tmake. Я с его помощью два скрипта написал - чтобы собирать проект под нужную платформу (x86 или ARM).
Go to the top of the page
 
+Quote Post
Johny
сообщение Aug 6 2008, 13:25
Сообщение #22


Частый гость
**

Группа: Свой
Сообщений: 140
Регистрация: 18-10-05
Пользователь №: 9 792



Цитата(Harbour @ Jul 6 2008, 09:37) *
дык а чего бы ему не работать ? есть интересный порт на DirectFB Никиты Егорова, см. :

http://www.mail-archive.com/fltk-dev@easys...m/msg00762.html


Пока не понял, как мне этот directFb хотя бы к PXA-255 прикрутить.
Насколька понял, чтоб fltk заработал, нужен directfb. Какие-то драйвера в нем вроде бы есть, но как это все использовать с конкретным PXA-шным fb (хотя бы где в конфигурации настроить разрешение 640х480 и глубину цвета 16bpp) я не понял. FLTK при компиляции выдает

=== making fluid ===
Linking fluid-shared...
../src/libfltk.so: undefined reference to `dfb_color_to_pixel'
collect2: ld returned 1 exit status
make[1]: *** [fluid-shared] Ошибка 1

судя по всему directfb неудачно собралась?
Go to the top of the page
 
+Quote Post
Johny
сообщение Aug 6 2008, 15:06
Сообщение #23


Частый гость
**

Группа: Свой
Сообщений: 140
Регистрация: 18-10-05
Пользователь №: 9 792



нашел багу в fltk в файле _draw.cxx

там объявлена внешняя функция dfb_color_to_pixel, которая в directfb является инлайновой, да еще static.

вставил в _draw.cxx:

extern "C" unsigned long dfb_pixel_from_color( DFBSurfacePixelFormat format,
const DFBColor *color );

static inline u32
dfb_color_to_pixel( DFBSurfacePixelFormat format,
u8 r, u8 g, u8 b )
{
const DFBColor color = { 0, r, g, b };

return dfb_pixel_from_color( format, &color );
}

вроде скомпилилось/слинковалось
теперь он мне зачем-то хочет запускать arm-овый бинарник fluid на х86 машине

и shared-library почему-то не сделал, хотя config-у ключик --enable-shared я указал

на первый взгляд microwindows полегче будет - здесь одна libfltk.a мегабайт весит, не считая directfb и прочего
Go to the top of the page
 
+Quote Post
Johny
сообщение Aug 8 2008, 06:34
Сообщение #24


Частый гость
**

Группа: Свой
Сообщений: 140
Регистрация: 18-10-05
Пользователь №: 9 792



Цитата(Harbour @ May 25 2008, 13:55) *
www.fltk.org


Познакомившись поближе с FLTK я не понял юмора:
Оно же работает ТОЛЬКО ПОВЕРХ Х! То есть для embedded системы нужна связка например FLTK + все тот же nano-X !!!? wacko.gif

Если я не прав, поправьте пожалуйста.
Может ли FLTK работать напрямую поверх fb и как его заставить?
Go to the top of the page
 
+Quote Post
Johny
сообщение Aug 8 2008, 12:53
Сообщение #25


Частый гость
**

Группа: Свой
Сообщений: 140
Регистрация: 18-10-05
Пользователь №: 9 792



Нашел вот сравнение Microwindows, FLTK (FLNX) и QT. Старенькая статейка, правда:
Цитата
Microwindows
Microwindows is an open source project from Century Software that is designed for tiny devices with small display units. It has a lot of features aimed at the modern graphical windowing environment. Like X, Microwindows is supported on variety of platforms.

Microwindows architecture is client/server based and has a layered design. At the lowest level are the screen and input device drivers (as for the keyboard or mouse) to interact with the actual hardware. At the middle level, a portable graphics engine provides support for line draws, area fills, polygons, clipping, and color models.

At the uppermost level, Microwindows supports two APIs: the Win32/WinCE API implementation also known as Microwindows, and the other API mostly resembles that of GDK and is known as Nano-X. Nano-X is used on Linux. It is an X-like API intended for low-footprint applications.

Microwindows has support for 1, 2, 4, and 8 bpp (bits per pixel) palletized displays, as well as 8, 15, 24, and 32 bpp trucolor displays. Microwindows also supports framebuffer, which makes it pretty fast. The footprint of the Nano-X server is somewhere around 100 to 150 kilobytes.

The average raw Nano-X app is in 30 to 60 K in size. Since Nano-X is designed for low-end devices with memory constraints, it does not have support for a large number of functions as X has, and so it can't really serve as a replacement for Tiny X (Xfree86 4.1).

You can run FLNX, a version of the FLTK (Fast Light Toolkit) application development environment modified to target Nano-X rather than X, on top of Microwindows. FLTK is described in this article.

Nano-X's advantages include:

• Unlike the Xlib implementation, Nano-X still runs synchronously per client, meaning that once a client request packet is sent, the server waits until the whole packet has arrived before servicing another client. This keeps the server code immensely simple, while still running very quickly.
• Small footprint

Nano-Xs' disadvantages include:

• Networking features are not properly tuned as yet (especially network transparency).
• Not many ready-to-use applications are available.
• Compared to X, Nano-X has not as much documentation and not as well supported -- although development is going on at lightening speed lately, so this may change.

FLTK API on Microwindows
FLTK is a simple but flexible GUI toolkit that is gaining increasing attention in the Linux world, especially for low-footprint environments. It provides most of the widgets you would expect from a GUI toolkit like buttons, dialog boxes, text boxes, and a nice selection of "valuators" (widgets used for the input of numeric values). These include sliders, scroll bars, dials, and a few others.

The Linux version of FLTK targeted for the Microwindows GUI engine is known as FLNX. FLNX is made up of two components: Fl_Widget and FLUID. Fl_Widget consists of all of the basic widget APIs. FLUID (Fast Light User Interface Designer) is a graphical editor used to produce FLTK source code. In all, FLNX is an excellent UI builder that can be used to create applications for embedded environments.

The footprint of Fl_Widget is about 40 to 48 K and FLUID (which includes every widget) weighs in at around 380 K. These very small footprints are making Fl_Widget and FLUID very popular in the world of embedded development.

Advantages include:

• Anyone accustomed to developing GUI-based applications under more established environments like Windows will adjust to the FLTK environment quite easily.
• Its documentation includes a very complete and well-written manual.
• It is distributed under the LGPL, so developers have flexibility in how they license their applications.
• FLTK is a C++ library (Perl and Python bindings are also available). The choice of an object-oriented model is a good one, as most modern GUI environments are object-oriented; this should also facilitate the porting of applications written to similar APIs.
• Century's environment provides several useful facilities, such as ScreenTop and the ViewML browser.

Its disadvantage is:

• While vanilla FLTK works with both X and Windows APIs, FLNX does not. Its incompatibility with X hinders its adoption in many projects.

Qt/Embedded
Qt/Embedded is Trolltech's new graphical user interface system for embedded Linux. Trolltech initially created Qt for the Linux desktop as a cross-platform development tool. It supports a variety of UNIX flavors, as well as Microsoft Windows. KDE, one of the most popular Linux desktop environments, is written with Qt.

Qt/Embedded is based on the original Qt, with a lot of fine tuning for the embedded environment. Qt Embedded directly interacts with the Linux I/O facilities via the Qt API. Those who are conversant and comfortable with object-oriented programming will find it an ideal environment. Also the object-oriented architecture makes the code structured, reusable, and fast. The Qt GUI is pretty fast compared to other GUIs, and its lack of layering makes Qt/Embedded the most compact environment for running Qt-based programs.

Trolltech has also come up with a Qt Palmtop Environment, popularly known as Qpe. Qpe provides a basic desktop window, and the environment provides an easy-to-use interface for development. Qpe includes a full set of Personal Information Management (PIM) applications, Internet clients, utilities, and more. However, you need to obtain a commercial license from Trolltech in order to integrate Qt/Embedded or Qpe into a product. (The original Qt has been available under the GPL since version 2.2.)

Its advantages include:

• Object-oriented architecture, which makes for faster execution
• Small footprint, about 800 K
• Anti-aliased text and alpha blended pixmaps

Its disadvantage is:

• Qt/Embedded and Qpe are available under commercial licenses only.


Кстати, а про SDL http://www.libsdl.org/ кто-нибудь может что-то хорошее сказать?

А есть еще китайский miniGUI http://www.minigui.org/ - кто нибудь юзал?
Go to the top of the page
 
+Quote Post
landy
сообщение Aug 8 2008, 13:58
Сообщение #26





Группа: Новичок
Сообщений: 1
Регистрация: 27-02-06
Пользователь №: 14 722



http://fox-toolkit.org/

Сравнивал по скорости отрисовки с QT - FOX быстрее был.
Go to the top of the page
 
+Quote Post
Johny
сообщение Aug 8 2008, 16:32
Сообщение #27


Частый гость
**

Группа: Свой
Сообщений: 140
Регистрация: 18-10-05
Пользователь №: 9 792



Прочитал, что FLTK можно скомпилить поверх NXLIB - надстройка над nano-X. Скомпилил nxlib-0.45, получил libX11.so. А FLTK требует еще libXext. Ее откуда брать? Кто работал, как вообще этот FLTK запустить на ARM?
Go to the top of the page
 
+Quote Post
Johny
сообщение Aug 11 2008, 12:30
Сообщение #28


Частый гость
**

Группа: Свой
Сообщений: 140
Регистрация: 18-10-05
Пользователь №: 9 792



Цитата(Johny @ Aug 8 2008, 20:32) *
Прочитал, что FLTK можно скомпилить поверх NXLIB - надстройка над nano-X. Скомпилил nxlib-0.45, получил libX11.so. А FLTK требует еще libXext. Ее откуда брать? Кто работал, как вообще этот FLTK запустить на ARM?


Вобщем зае запарился я с этим FLTK поверх nano-X но все-таки примерчик запустил.

Первым делом выкинул из FLTK-шного configure.in упоминание о -lXext

После этого при линковке появилось сообщение о ненайденных функциях XSetSelectionOwner и еще какой-то

Функции оказались в файле Selection.c библиотеки nxlib-0.45, но почему-то в Makefile этого объектника не оказалось - пришлось добавить. Заодно подправил warning - в структуре sstruct в одном месте была лишняя s: ssstruct. Один warning правда остался - implifict declaration of function time(). Что они имели в виду, когда писали time(0), я не понял, потом разберемся.

До кучи выкачал снапшот nano-X от 04.08.08 - оказывается проект еще не совсем умер, вот их mailing list

По ходу дела обнаружился flnx-1.1.8 - порт fltk на nano-X



А после всего этого, я посмотрел на fltk и подумал:
А зачем оно мне надо? Ведь это по сути набор виджетов, который я буду использовать процентов на 10, потому как оно все написано для большой машины. На эмбежженом девайсе с экраном 3,5' и десятью кнопками, одна из которых - питание, все это не надо.
Тот интерфейс, который для него разработан, прост и удобен, но большей части его компонентов нет ни в одной самой навороченной библиотеки виджетов. Не уверен, есть ли в этих библиотеках и функции рисования графиков - скорее всего, подходящих - нет.

В общем microwindows - рулез, возможно directFB и китайский mini-GUI. Остальное - излишества
Go to the top of the page
 
+Quote Post
Johny
сообщение Aug 11 2008, 16:07
Сообщение #29


Частый гость
**

Группа: Свой
Сообщений: 140
Регистрация: 18-10-05
Пользователь №: 9 792



О ужас! В библиотеке FLTK, в файле FL_x.cxx строка 582 я встретил оператор goto

А вообще у меня похоже в FLTK не идет ввод с клавиатуры в нужное окно.
Go to the top of the page
 
+Quote Post
aaarrr
сообщение Aug 11 2008, 16:33
Сообщение #30


Гуру
******

Группа: Свой
Сообщений: 10 713
Регистрация: 11-12-04
Пользователь №: 1 448



Цитата(Johny @ Aug 11 2008, 20:07) *
О ужас! В библиотеке FLTK, в файле FL_x.cxx строка 582 я встретил оператор goto

Так без goto жизни нет вообще smile.gif Особенно в kernel'е.

Сам сейчас занят аналогичной проблемой - созданием GUI. После долгих размышлений пришел к выводу, что нужно писать все самому.
Go to the top of the page
 
+Quote Post

4 страниц V  < 1 2 3 4 >
Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 16th April 2024 - 16:53
Рейтинг@Mail.ru


Страница сгенерированна за 0.01516 секунд с 7
ELECTRONIX ©2004-2016