#include <layout.h>
Inheritance diagram for SaX::SaXManipulateLayout:
Public Member Functions | |
void | setXOrgMultiheadMode (int) |
bool | setXOrgLayout (int, int, int, int, int) |
bool | setRelative (int, int, int, int) |
bool | removeRelative (int) |
int | getMultiheadMode (void) |
QList< QString > | getXOrgLayout (int) |
QList< QString > | getInputLayout (void) |
void | addInputLayout (int) |
void | removeInputLayout (int) |
SaXManipulateLayout (SaXImport *, SaXImport *) |
The layout manipulator requires two import objects (Layout and Card) to become created. Once created the manipulator object is able to get/set layout related information. The layout specifies the relationship and cooperation between the screens. The following example demonstrate how to check for the multihead mode currently used:
#include <sax/sax.h> int main (void) { SaXException().setDebug (true); QDict<SaXImport> section; int importID[] = { SAX_LAYOUT, SAX_CARD }; printf ("Importing data...\n"); SaXConfig* config = new SaXConfig; for (int id=0; id<2; id++) { SaXImport* import = new SaXImport ( importID[id] ); import->setSource ( SAX_SYSTEM_CONFIG ); import->doImport(); config->addImport (import); section.insert ( import->getSectionName(),import ); } printf ("checking multihead mode... "); SaXManipulateLayout layout ( section["Layout"],section["Card"] ); switch (layout.getMultiheadMode()) { case SAX_SINGLE_HEAD: printf ("single head mode\n"); break; case SAX_XINERAMA: printf ("Xorg Xinerama mode\n"); break; case SAX_TRADITIONAL: printf ("Xorg traditional multihead\n"); break; case SAX_CLONE: printf ("Xorg cloned multihead\n"); break; case SAX_TWINVIEW: printf ("Nvidia Twinview mode\n"); break; case SAX_TWINVIEW_CLONE: printf ("Nvidia Twinview clone mode\n"); break; default: printf ("unknown mode\n"); break; } return (0); }
Definition at line 132 of file layout.h.
|
An object of this type is used to configure the server layout. This includes mainly the configuration of the multihead arrangement and the multihead mode Definition at line 27 of file layout.cpp. References SaX::SaXException::errorString(), SaX::SaXException::excLayoutImportBindFailed(), SaX::SaXException::excNullPointerArgument(), and SaX::SaXImport::getSectionID(). Here is the call graph for this function: ![]() |
|
add the given pointer ID to the InputDevice option of the layout section. Implements SaX::SaXManipulateLayoutIF. Definition at line 339 of file layout.cpp. |
|
return the layout of the pointer devices. The list contains the Identifier numbers of the activated devices Implements SaX::SaXManipulateLayoutIF. Definition at line 308 of file layout.cpp. References SaX::SaXException::errorString(), and SaX::SaXException::excGetInputLayoutFailed(). Here is the call graph for this function: ![]() |
|
return an identifier for the currently used multihead mode. Currently there are the following modes: SAX_TWINVIEW,SAX_TRADITIONAL,SAX_SINGLE_HEAD,SAX_CLONE and SAX_XINERAMA. The return of SAX_UNKNOWN_MODE should never happen Implements SaX::SaXManipulateLayoutIF. Definition at line 185 of file layout.cpp. References SaX::SaXStorage::getCount(). Here is the call graph for this function: ![]() |
|
return the layout for the given screen (screen). The returned list has four elements which defines the (left | right | top | bottom) neighbours of the requested screen Implements SaX::SaXManipulateLayoutIF. Definition at line 274 of file layout.cpp. References SaX::SaXManipulateCard::selectCard(). Here is the call graph for this function: ![]() |
|
remove the given pointer ID from the InputDevice option of the layout section Implements SaX::SaXManipulateLayoutIF. Definition at line 357 of file layout.cpp. |
|
remove the Relative position information from the ServerLayout section if there is such an information Implements SaX::SaXManipulateLayoutIF. Definition at line 127 of file layout.cpp. References SaX::SaXManipulateCard::selectCard(). Here is the call graph for this function: ![]() |
|
These give the screen's location relative to another screen. When positioning to the right or left, the top edges are aligned. When positioning above or below, the left edges are aligned. The Relative form specifies the offset of the screen's origin (upper left corner) relative to the origin of another screen. Example: 1024 |---------- | | | 640 768 | 0 |-----| | | 1 | 480 |---------- |-----| To achieve this allignment the origin (upper left corner) of Screen[1] must be set to X=1024 Y=288 RELATIVE to Screen[0] This means the following function call setRelative ( 0,1,1024,288 ) Implements SaX::SaXManipulateLayoutIF. Definition at line 86 of file layout.cpp. References SaX::SaXManipulateCard::selectCard(). Here is the call graph for this function: ![]() |
|
set the layout for the given screen (screen). The parameters define the neighbour IDs at the positions left , right , top and bottom. If there is no neighbour at position X a negative value must be set Implements SaX::SaXManipulateLayoutIF. Definition at line 145 of file layout.cpp. References SaX::SaXManipulateCard::selectCard(). Here is the call graph for this function: ![]() |
|
set the multihead mode which can be one of the following settings: SAX_XINERAMA, SAX_TRADITIONAL or SAX_CLONE Implements SaX::SaXManipulateLayoutIF. Definition at line 57 of file layout.cpp. References SaX::SaXException::errorString(), and SaX::SaXException::excInvalidArgument(). Here is the call graph for this function: ![]() |