DirectFB - README(3)

来源:互联网 发布:php session lifetime 编辑:程序博客网 时间:2024/05/16 17:42

Configuring DirectFB

There are lots of things that can be configured.

We try to ship DirectFB with reasonable defaults but you might have to tweak things.

There are several ways to do this.

You may edit the system-wide configuration file <prefix>/etc/directfbrc or the user-specific $HOME/.directfbrc. There's a manual page called directfbrc(5) that documents all the settings. The same manual page also explains how DirectFB application can be configured via the command-line.

 

Configuring the Linux frame buffer device

DirectFB's prefered way-of-working needs a Linux kernel with frame buffer support.

Check the documentation in the kernel tree (/usr/src/linux/Documentation/fb/) on how to enable the frame buffer device for your graphics card.

 

The generic VESA frame buffer device does not support mode switching and you will not get hardware acceleration.

To make DirectFB work with veasfb, you should add the following lines to /etc/lilo.conf:

append="video=vesa:ywrap,mtrr"

 

'ywrap' enables panning with wraparound.

'mtrr' enables setting caching type for the frame buffer to write-combining.

vga=791

This sets the mode on startup. 791 means 1024x768@16, 788 means 800x600@16.

 

All VESA Video Modes:

Bits 640x480  800x600  1024x768  1280x1024  1600x1200

8         769          771          773             775              796

16       785          788          791             794              798

32       786          789          792             795               799

 

Other frame buffer devices support mode switching. DirectFB will only support modes listed in your /etc/fb.modes file. By default the first entry found is used.

 

If you have a Matrox card you may want to try the vsync patch found in the patches directory that enables applications to "idle wait" for the vertical retrace.

 

Using the builtin "window manager"

 Since DirectFB lacks a real window manager, we added a hack to the window stack to allow for basic window management.

While pressing the <Meta> (or Windows) key or alternatively <Caps-Lock> you can do the following:

- Drag your mouse to move the focused window.

- Drag and press <Ctrl> to resize the focused window.

- Drag and press <Alt> to change the opacity of the focused window.

- Press C to close the focused window.

- Press A to lower the focused window to the bottom.

- Press X to cycle the focus through the windows.

- Press S to raise the lowest window to the top.

- Press P to enable and show the mouse cursor.

- Press R to rotate the focused window by 90 degree.

- Press E to focus the window currently under the mouse cursor, useful in conjunction with 'X'.

- Press Escape to return from fullscreen mode to the desktop. (currently not advisable if the fullscreen app is still flipping)

- Press F12 to redraw the whole window stack.

 

You might want to use the "capslock-meta" option (see directfbrc(5)) if you don't have a <Meta> key.


 

 

 

 

原创粉丝点击