Forwarding my response to an email from Steve (below) to the
moblin-dev mail list, as I believe the information may be of
interest to others.
Bear in mind that with the recent addition of the Opened Hand team,
the application of their skills and experience will likely cause our
implementation plans to evolve over time, for the better of course ;)
So while the below is true today, this is a work-in-progress, open
source, project and the exact solution may change over the coming
months. Please stay tuned to moblin.org and this mail list for
emerging discussions about how and why the UI framework will
continue to evolve.
Shane...
("sabotage" on #moblin and moblin.org)
On Tue, Sep 23, 2008 at 5:05 PM, Zeigler, Steve
Steve wrote:
> Hi Shane,
>
> I'm looking at fc.c - your Four Corners source.
>
> It looks like you are building buttons with raw C code. For example:
<snip long source listing>
> My team is looking at building automated testing for the Moblin-2
> applications. How can we automatically find your buttons and monitor/inject
> events for them if they are not in a known structure?
>
> Or am I missing something?
Steve,
The size of the buttons is contained in the compiz plugin schema
(either by inspecting the default one installed, or by looking at the
users config). Compiz can be configured to use gconf or flat .ini
files to store these settings.
The locations are currently statically located in the corners of the
screen, so all you need is the size, and maybe the action/window class
name associated with it to be able to perform your testing I would
guess.
In the future, the locations may be configurable, but it would be via
the same compiz plugin options schema method already being used to
define the sizes, behaviors, icons and actions.
If you look in fc.xml.in (of fc.xml after compilation), you will find:
<subgroup>
<_short>Appearance</_short>
<option name="button_size" type="int">
<_short>Button Size(px)</_short>
<_long>Specify the size (in pixels) of the buttons to draw</_long>
<default>48</default>
<min>16</min>
<max>128</max>
</option>
There you can see the default size is 48. Using this, in conjunction
with the screen dimensions, it is relatively easy to determine the
button locations.
This schema is installed into $PREFIX/share/compiz/ or
$HOME/.compiz/metadata, depending on if compiz is compiled for global
configs (BUILD_GLOBAL = true) or not. My default is BUILD_GLOBAL =
true, as evidenced in plugin.info
Also, if compiz is compiled to NOT use gconf, then the users local
prefs are stored in $HOME/.config/compiz/compizconfig/config and
Default.ini. Inspecting Default.ini (or the file specified for
"profile" in config) will reveal any per-user custom button size
settings.
Hope this is enough to get you started.
Shane...
_______________________________________________
dev mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/dev
Manage subscription from http://moblin.org/user account (must be logged in).