Disko Forum logo Login  |  Register  |  Lost Password
My first disk app: how to set window bg color?

andre
Posts: 35
graphgraph

My first disk app: how to set window bg color? 5 Years ago  
Hello,

I am writing my first test application using disko.

My first goal: Configure the window background color.
Problem: I get nothing else but a permanent black screen.

Here is my main.cpp code:

#include <mms.h>
int main(int argc, char *argv[])
{
mmsInit(MMSINIT_WINDOWMANAGER, argc, argv,&quot;./diskorc.xml&quot;
MMSRootWindow *window = new MMSRootWindow(&quot;myMainWindow&quot;,&quot;100%&quot;,&quot;100%&quot;
MMSFBColor color1(1,1,1,1);
window-&gt;setBgColor(color1);
window-&gt;show();
sleep(3);
delete window;
return 0;
}


Can anyone let me know what am I doing wrong?

I would also like to leave the shell output, in case it is some configuration issue:

-- begin --

ConfigDB: ./configdb ()
DataDB: ./datadb ()
Logfile: ./logfile
First plugin:
Input map: default
Prefix: ./
Theme:
Backend:
Output type: X11
Video layer id: 0
Video layer resolution: 800x600
Video layer position: 50,50
Video layer pixelformat: ARGB
Video layer options:
Video layer buffermode: BACKSYSTEM
Graphics layer id: 0
Graphics layer resolution: 800x600
Graphics layer position: 50,50
Graphics layer pixelformat: ARGB
Graphics layer options:
Graphics layer buffermode: BACKSYSTEM
Visible screen area: 0,0,800,600
Log to stdout: no
Input Interval: 0 ms
Input Mode:
Call shutdown command: no
Shutdown command:
Touch pad/screen area: 0,0,0,0
Show mouse pointer: FALSE
Graphics window pixelformat:
Graphics surface pixelformat:
Extended acceleration: yes
Alloc Method:
Fullscreen: FALSE
Sourcelanguage: ukn
Targetlanguage: ukn
Add missing translations: no
----------------------------------------------------------------------
Starting Disko Application...
w: 1024, h: 768
DISKO: Available xv adaptors:
ATI Radeon Video Overlay (used)
Radeon Textured Video
DISKO: Using accelerated fill rectangle to YV12.
DISKO: Pixelformat ARGB is used for surfaces.
DISKO: Pixelformat ARGB is used for windows with alphachannel.
DISKO: Using accelerated fiello,

I am writing my first test application using disko.

My first goal: Configure the window background color.
Problem: I get nothing else but a permanent black screen.

Here is my main.cpp code:

#include <mms.h>
int main(int argc, char *argv[])
{
mmsInit(MMSINIT_WINDOWMANAGER, argc, argv,"./diskorc.xml";
MMSRootWindow *window = new MMSRootWindow("myMainWindow","100%","100%";
MMSFBColor color1(1,1,1,1);
window->setBgColor(color1);
window->show();
sleep(3);
delete window;
return 0;
}


Can anyone let me know what am I doing wrong?

I would also like to leave the shell output, in case it is some configuration issue:

-- begin --

ConfigDB: ./configdb ()
DataDB: ./datadb ()
Logfile: ./logfile
First plugin:
Input map: default
Prefix: ./
Theme:
Backend:
Output type: X11
Video layer id: 0
Video layer resolution: 800x600
Video layer position: 50,50
Video layer pixelformat: ARGB
Video layer options:
Video layer buffermode: BACKSYSTEM
Graphics layer id: 0
Graphics layer resolution: 800x600
Graphics layer position: 50,50
Graphics layer pixelformat: ARGB
Graphics layer options:
Graphics layer buffermode: BACKSYSTEM
Visible screen area: 0,0,800,600
Log to stdout: no
Input Interval: 0 ms
Input Mode:
Call shutdown command: no
Shutdown command:
Touch pad/screen area: 0,0,0,0
Show mouse pointer: FALSE
Graphics window pixelformat:
Graphics surface pixelformat:
Extended acceleration: yes
Alloc Method:
Fullscreen: FALSE
Sourcelanguage: ukn
Targetlanguage: ukn
Add missing translations: no
----------------------------------------------------------------------
Starting Disko Application...
w: 1024, h: 768
DISKO: Available xv adaptors:
ATI Radeon Video Overlay (used)
Radeon Textured Video
DISKO: Using accelerated fill rectangle to YV12.
DISKO: Pixelformat ARGB is used for surfaces.
DISKO: Pixelformat ARGB is used for windows with alphachannel.
DISKO: Using accelerated fill rectangle to ARGB.
DISKO: Using accelerated copy ARGB to ARGB.
DISKO: Using accelerated blend rectangle to ARGB.
DISKO: Using accelerated blend ARGB to YV12.

-- end --

I really appreciate any sort of help.

Thanks in advance!

Regards,
André
 
  The administrator has disabled public write access.
My first disk app: how to set window bg color?

andre
Posts: 35
graphgraph

Re:My first disk app: how to set window bg color? 5 Years ago  
I figured it out.
Topic closed.
 
  The administrator has disabled public write access.
My first disk app: how to set window bg color?

Stefan
Posts: 91
graph

Re:My first disk app: how to set window bg color? 5 Years ago  
Hi André,

welcome to our forums. Hope you can achive your goals with Disko with our help.

Can you tell us what you did to make this work for you?

My guess is a different color than 1,1,1,1 because it is almost black and almost completely transparent. Which should make almost no difference on most monitors

kind regards
Stefan
 
  The administrator has disabled public write access.
My first disk app: how to set window bg color?

andre
Posts: 35
graphgraph

Re:My first disk app: how to set window bg color? 5 Years ago  
Hi Stefan,

Yes, you are right. I missunderstood the value range for the RGB and alpha components.

Thanks,
André
 
  The administrator has disabled public write access.
Powered by FireBoard
get the latest posts directly to your desktop