|
|
Home » Developing U++ » U++ Developers corner » Rainbow, first iteration
( ) 1 Vote
Re: Rainbow, first iteration [message #32995 is a reply to message #32994] |
Tue, 28 June 2011 13:32   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
kohait00 wrote on Tue, 28 June 2011 06:39 | we actually dont need a common codes set, the backends normally provide them as well. i.e. linux input subsystem...
do you plan to detach the gui backends from CtrlCore completely?
|
I plan to keep Win32/X11 in CtrlCore. Most apps use just this and it would be 2 packages more in the list. In future, when MacOS and Android are available, I consider moving them there too.
Quote: |
i noticed that WinAlt does not use cham. is this planned?
|
Unlike, WinAlt is only the first "proof of concept", nothing more.
Quote: |
generally, from where do you plan to have the final GUI backend selection? from the top ackage like it is now or from the CtrlCore package? i mean where the guiplatform.h is finally situated. it could be 'overridden' in case of special specification. but all provided backends could live at some bottom level, to be selected with a compile flag like WINFB, LINUXFB, MACFB (those that are known and already exist).
|
I agree with compile flag and will be moving in that direction.
However, guiplatform.h placement is what it is supposed to be. I mean, first guiplatform.h in nest chain gets used. This is to allow everybody to groom his own backand withou fiddling with uppsrc code..
Quote: |
this would reliev the user to specify it's own guiplatform, instead he could only take the Framebuffer package and select the backend via compileflag.
|
Actually, I believe we are heading right there.
BTW: i commited the state of yesterday. what is missing, are the patch0 changes.. i found a mean to convert git patches to tortoise patches. so here it comes again. [/quote]
I have found a problem there: In Image.h, GUI_X11 is not yet defined....
|
|
|
Re: Rainbow, first iteration [message #32996 is a reply to message #32995] |
Tue, 28 June 2011 13:37   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
GUI_X11 not defined:
Quote: |
patch0 has some fixes concerning PLATFORM_X11, which should be GUI_X11 or PLATFORM_POSIX now, please review it. there also arises a slight problem with Image, it still has some code PLATFORM_WIN32 and PLATFORM_X11 dependant. but due to elimination of PLATFORM_X11, which is available from Core level, GUI_X11 is available from CtrlCore level only, Image, which is included by CtrlCore does not know anything from GUI_X11. i dont have any solution for this. maybe the platform dependant stuff should be made a special class, which is implemented platform dependantly.
|
|
|
|
Re: Rainbow, first iteration [message #32997 is a reply to message #32996] |
Tue, 28 June 2011 15:02   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
kohait00 wrote on Tue, 28 June 2011 07:37 | GUI_X11 not defined:
Quote: |
patch0 has some fixes concerning PLATFORM_X11, which should be GUI_X11 or PLATFORM_POSIX now, please review it. there also arises a slight problem with Image, it still has some code PLATFORM_WIN32 and PLATFORM_X11 dependant. but due to elimination of PLATFORM_X11, which is available from Core level, GUI_X11 is available from CtrlCore level only, Image, which is included by CtrlCore does not know anything from GUI_X11. i dont have any solution for this. maybe the platform dependant stuff should be made a special class, which is implemented platform dependantly.
|

|
OK, sorry. Will deal with this soon...
|
|
|
|
|
|
|
|
Re: Rainbow, first iteration [message #33013 is a reply to message #33003] |
Thu, 30 June 2011 11:14   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
mirek wrote on Wed, 29 June 2011 19:11 | Hm, I guess that perhaps we should move GUI_APP_MAIN to final backend...
|
i think so too. the APP_MAIN stuff posted above is running well, though. this would leave the user with only one place to think about GUI switching, this beeing the flag.
a project would always compile with or without GUI flag, even if it uses CtrlCore stuff in a console app (might be a case someday), since CtrlCore/CtrlLib don't depend on GUI flag.
BTW: with that, i managed to override APP_MAIN in SDLFb.
so SDL is painting Upp now, too but it's all rudimentary. when it compiles and draws, one can relax and continue. for me to commit the starting point, i'd need to know which final direction this APP_MAIN stuff goes to.
i'd vote for this too, (but this is sort of taste dependant):
to move the specification of the implemented gui's, beeing native, to guiplatform.h
and have the defaulting take effect in CtrlCore.h
thus it uses the same means as upper guiplatform.h
which can #include "../uppsrc/guiplatform.h"
for backwards compatibility 
CtrlCore.h:8
#ifndef GUIPLATFORM_INCLUDE
#ifdef PLATFORM_WIN32
#define flagWIN32GUI
#endif
#ifdef PLATFORM_POSIX
#define flagX11
#endif
//include again for defaults to activate
//guiplatform.h may not have ifndef/define protection
#include <guiplatform.h>
#endif
uppsrc/guiplatform.h
#ifdef flagWIN32GUI
#define GUIPLATFORM_INCLUDE <Ctrlcore/Win32Gui.h>
#endif
#ifdef flagX11
#define GUIPLATFORM_INCLUDE <Ctrlcore/X11Gui.h>
#endif
[Updated on: Thu, 30 June 2011 11:30] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Rainbow, first iteration [message #33047 is a reply to message #33046] |
Mon, 04 July 2011 22:57   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
kohait00 wrote on Mon, 04 July 2011 14:58 | did i understand you right, that key, first expects keydown/keyup events to be send, and then (after respective keyup) the corresponding char event?
|
Nope, characer is issued after keydown of course. For 'a' the sequence is K_A, 'a', K_A|K_KEYUP.
Quote: |
which windows is already doing natively, WM_KEYDOWN/UP and WM_CHAR.. (do you fake this for X11?)
|
No need to fake, X11 is quite similiar, the only difference is that it only has KeyPress/KeyRelease and you convert to chars using some functions functions...
I guess these two levels naturally have to be on any system.
Mirek
|
|
|
Re: Rainbow, first iteration [message #33048 is a reply to message #33047] |
Mon, 04 July 2011 23:29   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
OK.
i just commited a first shot SDLFb..
as i am not too experienced in SDL actually, there will be a lot to do yet.
we should think about grouping all the real Fb backends under Framebuffer. so the user actually does not need to add each and every backend at top level. Framebuffer could add them all and enable it with the right compile flag..
the speed of the stuff is actually really suboptimal due to full memcopy each repaint, i will try to fix this soon.
didn't watch the source development too carefully: have you added a BufferPainter creatable from an existing buffer yet? (specify the fb0 memmap directly as base, to speed up things).
[Updated on: Mon, 04 July 2011 23:31] Report message to a moderator
|
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 09:52:02 CEST 2025
Total time taken to generate the page: 0.01468 seconds
|
|
|