Comments (4)
Thank you for your inquiry and your interest in FINAL CUT. Unfortunately, I can't get enough information from your request to understand your problem. The Linux framebuffer console works fine with FINAL CUT if the TERM
environment variable is set to "linux
".
Here is a small C program to test the Linux framebuffer:
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/fb.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
int main()
{
struct fb_var_screeninfo screen_info;
struct fb_fix_screeninfo fixed_info;
char *buffer = NULL;
size_t buflen;
int fd = -1;
int r = 1;
int x,y;
fd = open("/dev/fb0", O_RDWR);
if ( fd >= 0 )
{
if ( ! ioctl(fd, FBIOGET_VSCREENINFO, &screen_info)
&& ! ioctl(fd, FBIOGET_FSCREENINFO, &fixed_info) )
{
buflen = screen_info.yres_virtual * fixed_info.line_length;
buffer = mmap(NULL,
buflen,
PROT_READ|PROT_WRITE,
MAP_SHARED,
fd,
0);
if ( buffer != MAP_FAILED )
{
printf ("Framebuffer works on this pc!\n");
printf (" Name : %s\n", fixed_info.id);
printf (" Address : %ld\n", fixed_info.smem_start);
printf (" Size : %d\n", fixed_info.smem_len);
printf (" xres : %d\n", screen_info.xres);
printf (" yres : %d\n", screen_info.yres);
printf (" bpp : %d\n", screen_info.bits_per_pixel);
for (x=0; x < screen_info.xres; x++)
{
/* white line */
*(buffer + (x * screen_info.bits_per_pixel/8) ) = 0xff; /* blue */
*(buffer + (x * screen_info.bits_per_pixel/8) + 1) = 0xff; /* green */
*(buffer + (x * screen_info.bits_per_pixel/8) + 2) = 0xff; /* red */
*(buffer + (x * screen_info.bits_per_pixel/8) + fixed_info.line_length * (screen_info.yres-1) ) = 0xff; /* blue */
}
for (y=0; y < screen_info.yres; y++)
{
*(buffer + (y * screen_info.xres) * (screen_info.bits_per_pixel/8) + 1) = 0xff; /* green */
*(buffer + (y * screen_info.xres + screen_info.xres-1) * (screen_info.bits_per_pixel/8) + 2) = 0xff; /* red */
}
r = 0; /* Indicate success */
}
else
{
perror("mmap");
}
}
else
{
perror("ioctl");
}
}
else
{
perror("open");
}
/*
* Clean up
*/
if (buffer && buffer != MAP_FAILED)
munmap(buffer, buflen);
if (fd >= 0)
close(fd);
return r;
}
/* gcc framebuffer-check.c -o framebuffer-check */
Unfortunately, I don't know what kind of hardware, CPU architecture, and distribution you are developing. If you could give me more details or specific scenarios about the problems, I might be able to help you.
from finalcut.
That looks like an interesting project. Let me see how I can help you.
In the first photo, I can see that you are running your display at a resolution of 320×240 pixels. The used font should be a standard CGA font with a character size of 8×8 pixels. That should give you a text mode with 40 columns and 30 lines.
The "cam viewer" window in the second photo is cut off on the right side, so you probably have a window size of more than 40 characters. Should your window be exactly 40 characters wide, you only need to move the window one character to the left.
In the third image, now with a character size of 9×18 pixels, I have difficulty following your execution. What am I seeing here? What is the other screen? Has the display been replaced? Is there a second output device on your evaluation board? Or is the screenshot from a completely different device?
When you open the file-open-chooser, it appears in the center of your terminal screen. This means that, if your main window is in the center of the screen, the FFileDialog
widget will be displayed over the main window.
For example:
auto filename = finalcut::FFileDialog::fileOpenChooser (this, directory, filter);
if ( ! filename.isEmpty() )
{
// open filename...
}
If you require a different positioning behavior, please create a class derived from FFileDialog
and overload the FFileDialog::adjustSize()
method with your own code.
It is difficult for me to find a more precise solution without seeing your code and more information about your application.
I hope I was able to help you.
from finalcut.
Thanks a lot
My problem solved with use FFileDialog::adjustSize()
method
from finalcut.
thank for your help
i'm using allwinner v3s chip with sinux v3 board
the value of TERM
variable is linux
and this is output of commands
this is my program output in this display
and this is output in other screen (with bigger size!)
also I have a FFileDialog that i want to open on top of the main windows
what i should to do for this ?
i think the problem is screen resolution
Do you have any suggestions to fix this problem?
from finalcut.
Related Issues (20)
- How to acces FLineEdit text after event FFocusEvent HOT 2
- Problem with FLabel drawing double HOT 2
- Dynamic Layout issue HOT 1
- FListView crashing HOT 7
- Catching the terminal focus and unfocus signal in finalcut HOT 2
- ColorPalette not resetting after close HOT 2
- pretty last moment to get a newer version into debian HOT 1
- Does it support MSYS2 MinGW64? HOT 2
- Failed to build on MSYS2 MinGW64 HOT 2
- Compile error with clang++ -std=c++20 HOT 2
- FListview hide columns HOT 2
- Make it work on touchscreens HOT 4
- Build failed on ubuntu 22.04.2 LTS HOT 1
- can i recomend you guys an acscii 3d game HOT 2
- Enabling text selection HOT 3
- does it need ncurses?? HOT 1
- [FIX] Unable to build latest "main" without this HOT 1
- building problem with gcc-14 HOT 3
- cmake CPM building
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from finalcut.