the ScreenRect
Thierry Arbellot
thierry.arbellot at wanadoo.fr
Tue Jun 7 16:26:24 EDT 2005
Thank you Andre.
Here is the code :
static char staticText[255];
#ifdef __STDC__
void XTK_ScreenRect(
char *args[],
int nargs,
char **retstring,
Bool *pass,
Bool *error)
#else
void XTK_ScreenRect(args, nargs, retstring, pass, error)
char *args[];
int nargs;
char **retstring;
Bool *pass;
Bool *error;
#endif
{
GDHandle mainDevice;
GDHandle theDevice;
Rect *theRect;
char text[50];
mainDevice = GetMainDevice(); // main monitor
theRect = &((*mainDevice)->gdRect); // copy coordinates in the first
line
sprintf(staticText,"%d,%d,%d,%d",theRect->left,theRect->top,theRect-
>right,theRect->bottom);
theDevice = GetDeviceList(); // get the first monitor in the list of
all monitors
while( theDevice!=NULL ) {
if( theDevice!=mainDevice ) { // skip the main monitor, already in
the first line
theRect = &((*theDevice)->gdRect);
sprintf(text,"\n%d,%d,%d,%d",theRect->left,theRect->top,theRect-
>right,theRect->bottom);
strcat(staticText,text); // add coordinates
}
theDevice = GetNextDevice(theDevice); // get next monitor
}
*retstring = staticText; // return the list of coordinates
return;
}
Thierry
PS: Andre, excuse me for my poor English, but what means "coin a bash
script" ?
On 2005, Jun 7, , at 19:00, Andre Garzia wrote:
>
> On Jun 7, 2005, at 12:00 PM, Thierry Arbellot wrote:
>
>> Could this help ?
>>
>> I have developed a function in an external that returns the
>> coordinates of all monitors, one per line.
>> The main screen is in the first line.
>>
>> function name: xTKScreenRect()
>>
>> It's available for download
>>
>> MacOS X
>> http://www.digital-salade.com/toki/download/TokiUtilities.bundle.zip
>>
>> Windows 2000/XP
>> http://www.digital-salade.com/toki/download/TokiUtilities.dll.zip
>>
>> Thierry
>
> Thierry,
>
> congrats on the externals!!!! could you tell what function did you use
> to get the coordinates in MacOS X, maybe I can also coin a bash script
> to do the same effect!
>
> Cheers
> andre
>
>
>
>>
>> On 2005, Jun 7, , at 16:19, Troy Rollins wrote:
>>
>>>
>>> On Jun 7, 2005, at 10:06 AM, Roger.E.Eller at sealedair.com wrote:
>>>
>>>> We also need multi-monitor support. Our applications provide tools
>>>> for a
>>>> graphics department of 20 PC workstations. All of these have dual
>>>> monitors
>>>> using Nvidia cards. My apps developed with Rev will fail to work
>>>> properly
>>>> unless they are displayed on the primary (screen 1) monitor.
>>>
>>> Which is simply unacceptable. I have two projects that I am
>>> beginning right now.
>>>
>>> The first - involves strong support for multiple screens. Rev is
>>> ruled out due to Bug #193
>>>
>>> The second - involves strong support for QuickTime streamed media.
>>> Rev is ruled out due to Bug #1239 & #2692
>>>
>>> Neither of which is helped by the lack of a data grid object #670.
>>>
>>> Maybe I just happen to do stuff at which Rev is particularly buggy,
>>> but I can't support Rev if it can't support my projects.
>>> --
>>> Troy
>>> RPSystems, Ltd.
>>> http://www.rpsystems.net
>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>
>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
> --
> Andre Alves Garzia ð 2004 ð BRAZIL
> http://studio.soapdog.org
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list