LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-09-2010, 06:59 AM   #1
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 54
Now hosting the new Gtk RGBA module I created on Launchpad


https://launchpad.net/librgba-c++

Essentially, this module can be fine-tuned to the user's liking, using four integers instead of a boolean. By allowing for the red, green, blue, and alpha values to be fine-tuned, the user can control how transparent or opaque their desktop is. And how is this possible? C++ instead of C.

How do you guys think of being able to customize RGBA?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-10-2010, 04:08 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Cool. Any chance you can port it to C ?
 
Old 03-10-2010, 04:11 PM   #3
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
It does sound cool!

Can you explain a bit more about "controlling the transparency of the desktop" ? What does this mean-- ALL things on the desktop, or application windows, or.. what? Does this transparency use/require compositing?

Thanks,
Sasha
 
Old 03-10-2010, 07:34 PM   #4
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by Kenny_Strawn View Post
https://launchpad.net/librgba-c++

Essentially, this module can be fine-tuned to the user's liking, using four integers instead of a boolean. By allowing for the red, green, blue, and alpha values to be fine-tuned, the user can control how transparent or opaque their desktop is. And how is this possible? C++ instead of C.

How do you guys think of being able to customize RGBA?
Out of curiosity I visited the link and examined the source:


http://bazaar.launchpad.net/~mango-k...ba-c%2B%2B.cpp :



Code:
1 	5 	

#include <iostream>

2 		

3 		

using namespace std;

4 		

5 		

int rgba (int Red, int Green, int Blue, int Alpha)

6 		

{

7 		

	return 0;

8 		

};
- sorry, I am too lazy to change formatting manually.

Well, what can I say - your sense of humor appears to be much more black and acid than mine.
 
2 members found this post helpful.
Old 03-10-2010, 08:14 PM   #5
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Forgive my C novice-ness, but is that the entire program?
 
Old 03-10-2010, 08:15 PM   #6
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by GrapefruiTgirl View Post
Forgive my C novice-ness, but is that the entire program?
The question in this case is irrelevant - the function always returns 0.
 
1 members found this post helpful.
Old 03-10-2010, 08:59 PM   #7
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Original Poster
Rep: Reputation: 54
It is supposed to be a library, not a program.

In any case, what else other than "return 0" can I use inside the curly braces?

Last edited by Kenny_Strawn; 03-10-2010 at 09:01 PM.
 
Old 03-10-2010, 09:09 PM   #8
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Original Poster
Rep: Reputation: 54
Quote:
Originally Posted by GrapefruiTgirl View Post
It does sound cool!

Can you explain a bit more about "controlling the transparency of the desktop" ? What does this mean-- ALL things on the desktop, or application windows, or.. what? Does this transparency use/require compositing?

Thanks,
Sasha
To answer your question, the current RGBA module only has two functions: on or off. This is supposed to allow for in-between values, like Clutter's RGBA does.
 
Old 03-10-2010, 10:24 PM   #9
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Original Poster
Rep: Reputation: 54
I made some changes to the code that I will soon upload

Code:
#include <iostream>

using namespace std;

int rgba (int Red, int Green, int Blue, int Alpha)
{
	int alphaRed = Alpha*(Red);
	int alphaGreen = Alpha*(Green);
	int alphaBlue = Alpha*(Blue);
	int alphaEquation = alphaRed + alphaGreen + (1 - alphaGreen - alphaRed)*alphaBlue;
	return 0;
};
Essentially, I added the equation to calculate the transparency effect. Hopefully, this will solve the problem. At least it compiled successfully.
 
Old 03-10-2010, 11:11 PM   #10
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Original Poster
Rep: Reputation: 54
For the education of some members, listen up:

As I said before, the current RGBA module for Gtk+ only has two settings: on or off.

This is because C does not support object-oriented programming (OOP), and therefore does not support variables, which are key to allowing RGBA to support values in-between.

Think of comparing this RGBA module to the current one as comparing Windows 7's UAC to Vista's UAC (sorry if this may be off topic). The difference is that the latter has in-between settings, allowing you to customize it in such a way that it is less intrusive.

Similarly, this RGBA module allows the user to tweak its four values (Red, Green, Blue, and Alpha) in such a way that you are not bound by a boolean.
 
Old 03-11-2010, 02:16 PM   #11
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by Kenny_Strawn View Post
I made some changes to the code that I will soon upload

Code:
#include <iostream>

using namespace std;

int rgba (int Red, int Green, int Blue, int Alpha)
{
	int alphaRed = Alpha*(Red);
	int alphaGreen = Alpha*(Green);
	int alphaBlue = Alpha*(Blue);
	int alphaEquation = alphaRed + alphaGreen + (1 - alphaGreen - alphaRed)*alphaBlue;
	return 0;
};
Essentially, I added the equation to calculate the transparency effect. Hopefully, this will solve the problem. At least it compiled successfully.
Nonsense - your code still returns zero.
 
1 members found this post helpful.
Old 03-11-2010, 02:17 PM   #12
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by Kenny_Strawn View Post
For the education of some members, listen up:

As I said before, the current RGBA module for Gtk+ only has two settings: on or off.

This is because C does not support object-oriented programming (OOP), and therefore does not support variables, which are key to allowing RGBA to support values in-between.

Think of comparing this RGBA module to the current one as comparing Windows 7's UAC to Vista's UAC (sorry if this may be off topic). The difference is that the latter has in-between settings, allowing you to customize it in such a way that it is less intrusive.

Similarly, this RGBA module allows the user to tweak its four values (Red, Green, Blue, and Alpha) in such a way that you are not bound by a boolean.

Nonsense.
 
1 members found this post helpful.
Old 03-11-2010, 02:18 PM   #13
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by Kenny_Strawn View Post
It is supposed to be a library, not a program.

In any case, what else other than "return 0" can I use inside the curly braces?

First learn, then ask.
 
1 members found this post helpful.
Old 03-12-2010, 05:27 PM   #14
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Original Poster
Rep: Reputation: 54
Here is the final code:

http://bazaar.launchpad.net/~mango-k...ba-c%2B%2B.cpp

Hopefully this is correct.
 
Old 03-12-2010, 07:37 PM   #15
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by Kenny_Strawn View Post
Here is the final code:

http://bazaar.launchpad.net/~mango-k...ba-c%2B%2B.cpp

Hopefully this is correct.
Nonsense.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
module rt2500usb loaded, but no interface created wufo Linux - Networking 1 12-30-2009 10:53 AM
module rt2500usb loaded, but no interface created wufo Slackware 1 12-29-2009 02:41 PM
Hosting sites created by Joomla on Linux hahamama1 Linux - Server 1 05-25-2008 03:17 PM
dvb devices not created, and wrong module loaded? greenmuzz Linux - Hardware 4 07-09-2005 07:43 AM


All times are GMT -5. The time now is 02:30 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration