How do views work?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
AaronD Offline
Senior Member
Posts: 252
Joined: Jan 2007
Reputation: 0
Location: Dubai, United Arab Emirates
Post: #1
Can someone please explain to me how views work? What is a "view" as opposed to a "window" - my understanding is that they are both just IDs? Are there predefined view IDs for the specific type of view that you are creating, and if so can you please point me in the direction of this list?

Thanks
find quote
mcborzu Offline
Skilled Skinner
Posts: 3,381
Joined: Feb 2009
Reputation: 15
Location: dsf
Post: #2
Really you are using the parent "window", like myvideonav.xml, the "views" like:

Viewtype_Poster.xml
Viewtype_Files.xml
Viewtype_Banner.xml

Are just for organization and ease of coding....

There are no predefined ID's for views but seems like everyone uses id="50" as the file view. Most people use 50-59 for views and if need to branch out use 500 and up. Not a requirement to use 500 and up but after digging thru tons of skins I'd say thats the most common practice..

[Image: widget]

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,181
Joined: Oct 2003
Reputation: 175
Post: #3
AaronD: I presume this is for coding up that patch.

If so, just take spiff's diff and alter it as per his comment on trac.

Essentially the following logic is used to determine which view to show in XBMC:

1. We query the ViewModes.db for the appropriate window and path, and retrieve a viewmode integer that is composed of the actual view id from the skin, plus the view <type> from the skin as well (there's about half a dozen different types the skinner can choose from).

2. We then send that to GUIViewControl which runs through the views the skinner has supplied and tries to find one that matches - we first look for the ID and use that. If that fails we try based on type (i.e. we look for a matching view container of the same type). If that fails we fall back to the first one.

You'd basically be changing step 1 above.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
AaronD Offline
Senior Member
Posts: 252
Joined: Jan 2007
Reputation: 0
Location: Dubai, United Arab Emirates
Post: #4
jmarshall Wrote:AaronD: I presume this is for coding up that patch.

If so, just take spiff's diff and alter it as per his comment on trac.

Ok, thanks. I just wanted to understand how this part works without just doing anything blind.

mcborzu, thanks.
find quote