MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Skins


Skins You are working on a new Skin? Post it here!

Reply
 
Thread Tools Display Modes
Old 2007-02-15, 13:54   #1 (permalink)
Retired Team Member
 
Join Date: Jan 2007
Posts: 72
Thanks: 1
Thanked 1 Time in 1 Post

Country:


Question Touchscreen skin

Hi guys,

has anyone got a MP-skin usable for a touchscreen?

I've got a Zalman HD160XT case which comes with a built-in touchscreen (secondary screen). I have a little app running that mirrors the display of the primary screen on the touchscreen (stretchblit) and which forwards mouse clicks on the touchscreen into mouse down/up onto the primary screen.

But, the default MP-skin is NOT usable with a touchscreen. For example, when I click a button on the home screen, the menu starts to scroll like crazy...

Regards

dero
dero is offline   Reply With Quote
Old 2007-02-15, 15:21   #2 (permalink)
Portal Member
 
Join Date: Jan 2006
Posts: 136
Thanks: 1
Thanked 2 Times in 2 Posts


Default

Hi dero!

As far as I know there is no special touch-screen skin for MP. But I remember some people using the standard blue two but with home interface instead of the normal interface. But still there's nothing like volume-buttons etc.

As to stretchblit: Does this program really clone your primary display to your secondary display without messing up your DirectX acceleration on the primary display? I've been looking for something like that a long time...

thanks,

Michael
MJGraf is online now   Reply With Quote
Old 2007-02-15, 16:04   #3 (permalink)
Retired Team Member
 
Join Date: Jan 2007
Posts: 72
Thanks: 1
Thanked 1 Time in 1 Post

Country:


Default

Hi MJ,

Quote:
Originally Posted by MJGraf View Post
As far as I know there is no special touch-screen skin for MP. But I remember some people using the standard blue two but with home interface instead of the normal interface. But still there's nothing like volume-buttons etc.
Then maybe someone should design such a skin... I am quite new to MP, but perhaps I give it a try.

Quote:
Originally Posted by MJGraf View Post
As to stretchblit: Does this program really clone your primary display to your secondary display without messing up your DirectX acceleration on the primary display? I've been looking for something like that a long time...
I don't know whether it messes up DirectX acceleration. However, I cannot see any difference. But, it flickers a little bit when you have running something in non-fullscreen (i.e. in the little box at the lower left).

How to do it:

You get the DesktopDC using CreateDC('DISPLAY', nil, nil, nil). You bitblt the contents to an offscreen bitmap. You stretchblt this offscreen bitmap to another offscreen bitmap. You blit the result to your window or you get the DesktopDC again and blit directly into the second display. Delphi-Code:

Code:
    
    sw := Screen.Monitors[0].Width;
    sh := Screen.Monitors[0].Height;

        if ScreenBuffer = nil then
        begin
            ScreenBuffer := TBitmap.Create;
            ScreenBuffer.Width := sw;
            ScreenBuffer.Height := sh;
        end;

        if DisplayBuffer = nil then
            DisplayBuffer := TBitmap.Create;

        DisplayBuffer.Width := pbDisplay.ClientWidth;
        DisplayBuffer.Height := pbDisplay.ClientHeight;

        ScreenBuffer.Canvas.Lock;
        DisplayBuffer.Canvas.Lock;

        // scr -> buf
        DesktopDC := CreateDC('DISPLAY', nil, nil, nil);
        try
            BitBlt( ScreenBuffer.Canvas.Handle, 0, 0, ScreenBuffer.Width, ScreenBuffer.Height, DesktopDC, 0, 0, SRCCOPY );
        finally
            DeleteDC( DesktopDC );
        end;

        // buf -> dbuf
        PDC := DisplayBuffer.Canvas.Handle;
        if setDisplayHighQuality then SetStretchBltMode( PDC, STRETCH_HALFTONE )
        else SetStretchBltMode( PDC, STRETCH_DELETESCANS );

        StretchBlt( PDC, 0, 0, pbDisplay.ClientWidth, pbDisplay.ClientHeight, ScreenBuffer.Canvas.Handle,
            0, 0, sw, sh, SRCCOPY );

        // dbuf -> scr
        ul := pbDisplay.ClientToScreen( Point( 0, 0 ) );

        PDC := CreateDC('DISPLAY', nil, nil, nil);
        try
            BitBlt( PDC, ul.X, ul.Y, pbDisplay.ClientWidth, pbDisplay.ClientHeight, DisplayBuffer.Canvas.Handle,
                0, 0, SRCCOPY );
        finally
            DeleteDC( PDC );
        end;

        DisplayBuffer.Canvas.Unlock;
        ScreenBuffer.Canvas.Unlock;
Regards,

dero
dero is offline   Reply With Quote
Old 2007-02-15, 19:04   #4 (permalink)
Portal Member
 
Join Date: Jan 2006
Posts: 136
Thanks: 1
Thanked 2 Times in 2 Posts


Default

Hi dero!

Thanks a lot! This sounds really cool! Unfortunately I won't have the time to do some coding at least for the next two or three weeks. But after that, I'll definately give it a try. (Shouldn't be too hard to translate this into c++ as I have no clue of Delphi at all...)

Thanks again,

Michael

PS: I wouldn't complain if you were the one to start a touch screen skin ;-) Anyways, there are many discussions atm (or should I say rumors of discussions ;-) )about MP NG (new generation) and I guess they will implement this fancy new skinning language (WPF if I don't mix it up with some fancy other MS-abbreviation...) perhaps you should therefore head for this (new) type of skin. Would be a shame if your skin was outdated only a few weeks / months after you finished it...
MJGraf is online now   Reply With Quote
Old 2007-02-15, 22:00   #5 (permalink)
Retired Team Member
 
Join Date: Jan 2007
Posts: 72
Thanks: 1
Thanked 1 Time in 1 Post

Country:


Default

Quote:
Originally Posted by MJGraf View Post
Thanks a lot! This sounds really cool! Unfortunately I won't have the time to do some coding at least for the next two or three weeks. But after that, I'll definately give it a try. (Shouldn't be too hard to translate this into c++ as I have no clue of Delphi at all...)
It's quite straightforward. Usually, I am working with C++ or Java too. But, for quick'n'dirty applications I always use Delphi.


Quote:
Originally Posted by MJGraf View Post
PS: I wouldn't complain if you were the one to start a touch screen skin ;-) Anyways, there are many discussions atm (or should I say rumors of discussions ;-) )about MP NG (new generation) and I guess they will implement this fancy new skinning language (WPF if I don't mix it up with some fancy other MS-abbreviation...) perhaps you should therefore head for this (new) type of skin. Would be a shame if your skin was outdated only a few weeks / months after you finished it...
That's a good point. I am gonna wait...

Regards

dero
dero is offline   Reply With Quote
Reply

Bookmarks

Tags
skin, touchscreen

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MP with Touchscreen Hivanoe Improvement Suggestions 4 2007-12-18 13:51
Touchscreen Skin smithft Skins 11 2006-01-22 12:48
ProjectX skin with touchscreen. How to use fullscreen TV? tommer Skins 4 2005-08-02 09:06
HTPC with Touchscreen? hwahrmann HTPC Projects 5 2005-06-21 13:33
Touchscreen compatable Anonymous Improvement Suggestions 3 2004-07-25 00:48


All times are GMT +1. The time now is 15:53.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden