Handling mouse events on transparent window conditionally

2011-05-31 Thread Deepa
Hi,
 
I am developing an Desktop application in which I should be able to take mouse 
events on transparent window. But, transparent NSWindow does not take mouse 
events. So, I have set  setIgnoreMouseEvents to NO which allows the transparent 
window to take mouse events.
 
I have the problem in the following scenario:
There is dynamically created rectangular shape on this window. The transparent 
window should not take mouse events in this region; it should be delegated to 
the window (of some other app) that is present behind this shape.
For this purpose, if the mouseDown event is inside the shape I am setting 
setIgnoreMouseEvents to YES. Now, if the user performs mouse events in the area 
outside the shape the transparent window should take the event. Since, 
setIgnoreMouseEvents is set to YES, window does not take mouse events.
 
There is no way to identify that mouseDown event has occurred so that I can set 
setIgnoreMouseEvents to NO.
 
Could someone suggest me some best method to handle mouse events on transparent 
window?
 
Thanks and Regards,
Deepa---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Event Tap(CFMachPortRef) problem for Hot Key- callback is not invoked

2011-03-08 Thread Deepa
Hi Daniel,

Thank you for the response.

Our app provides the user with an option of using system shortcut keys for 
capturing.
For example, 
Suppose Cmd+Shift+4 is the system shortcut used to capture the full screen; 
user can use the same combination of keys to capture the full screen from my 
app.
If I use the Hot key API RegisterEventHotKey(), I cannot override the system 
behavior with my app behavior for the shortcut Cmd+Shift+4.
So, I am using the tapping mechanism if user wants to override system behavior.

But, sometimes I do not get any callback. How do I solve this?

Regards,
Deepa

On 08-Mar-2011, at 2:31 PM, Jean-Daniel Dupas wrote:

 
 Le 8 mars 2011 à 04:40, Deepa a écrit :
 
 Hi,
 
 I am developing a desktop application that supports one of the feature 
 through Hot Key. I am using Event Tap for this to work. 
 
 But, sometimes (randomly) the callback is not invoked; Hot Key does not work 
 and hence the feature seems to be not working. 
 
 Could someone help me out in identifying the problem here.
 
 Following is the code snippet:
 
  -( void )startEventTapinThread //Called in a separate thread.
  {
  NSAutoreleasePool *pool =[ [ NSAutoreleasePool alloc] init];
  
  CFRunLoopRef runloop =(CFRunLoopRef)CFRunLoopGetCurrent();
  CGEventMask interestedEvents = 
 CGEventMaskBit(kCGEventFlagsChanged)|CGEventMaskBit(kCGEventKeyDown);
  CFMachPortRef eventTap = CGEventTapCreate(kCGSessionEventTap, 
 kCGHeadInsertEventTap, 0, interestedEvents, myCGEventCallback, self); 
 //self is the object pointer our method
  CFRunLoopSourceRef source = 
 CFMachPortCreateRunLoopSource(kCFAllocatorDefault, eventTap, 0);
  CFRunLoopAddSource((CFRunLoopRef)runloop , source, 
 kCFRunLoopCommonModes);
  CFRunLoopRun();
  [ pool release];
  }
 
  CGEventRef myCGEventCallback(CGEventTapProxy proxy, CGEventType type, 
 CGEventRef event, void *refcon)
  {
  CGEventType eventType = CGEventGetType(event);
  //execute the code related to feature
  }
 
 
 
 Why you don't use the HotKey API instead (RegisterEventHotKey()) ? It does 
 not require root access or accessibility enabled and it works quite well.
 
 
 -- Jean-Daniel
 
 
 
 
 

---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Event Tap(CFMachPortRef) problem for Hot Key- callback is not invoked

2011-03-07 Thread Deepa
Hi,

I am developing a desktop application that supports one of the feature through 
Hot Key. I am using Event Tap for this to work. 

But, sometimes (randomly) the callback is not invoked; Hot Key does not work 
and hence the feature seems to be not working. 

Could someone help me out in identifying the problem here.

Following is the code snippet:

   -( void )startEventTapinThread //Called in a separate thread.
   {
NSAutoreleasePool *pool =[ [ NSAutoreleasePool alloc] init];

CFRunLoopRef runloop =(CFRunLoopRef)CFRunLoopGetCurrent();
CGEventMask interestedEvents = 
CGEventMaskBit(kCGEventFlagsChanged)|CGEventMaskBit(kCGEventKeyDown);
CFMachPortRef eventTap = CGEventTapCreate(kCGSessionEventTap, 
kCGHeadInsertEventTap, 0, interestedEvents, myCGEventCallback, self); 
//self is the object pointer our method
CFRunLoopSourceRef source = 
CFMachPortCreateRunLoopSource(kCFAllocatorDefault, eventTap, 0);
CFRunLoopAddSource((CFRunLoopRef)runloop , source, 
kCFRunLoopCommonModes);
CFRunLoopRun();
[ pool release];
   }

   CGEventRef myCGEventCallback(CGEventTapProxy proxy, CGEventType type, 
CGEventRef event, void *refcon)
   {
CGEventType eventType = CGEventGetType(event);
//execute the code related to feature
   }

Thanks and Regards,
Deepa---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


API to check if the screen is zoomed

2011-03-04 Thread Deepa
Hi,

I am developing an Desktop application in which I want to perform some 
operation if the System screen is zoomed.
Is there any API to identify if the screen is zoomed or not.

If notification is the solution that will not work for me. Because, the screen 
might have been zoomed before my app is launched.
Is there any way to handle this?

Thanks and Regards,
Deepa---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


The 'Open with' option is automatically changed with my app when my app is installed

2011-03-02 Thread Deepa
Hi,

I am developing an Desktop application which organizes and plays movie files. 
So, I have added the mp4, mov, avi, m4v (mp4, mov, avi, m4v extensions) as 
document type under Properties of my application target.
The problem is that when the user installs my app in Applications folder of his 
system, the default option for opening the mp4 movie file changes to Voila from 
QuickTime Player automatically. The default option is nothing but the 'Open 
With' option provided in the Info window of a file. This happens for most of 
the users. Why is this happening? How do I solve this?

Thanks and Regards,
Deepa---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: original image size is not retained when it is exported as PDF using CGImageDestinationRef

2011-03-01 Thread Deepa
Thank you Kyle, David.

Regards,
Deepa

On 01-Mar-2011, at 1:31 PM, Kyle Sluder wrote:

 On Feb 28, 2011, at 8:29 PM, Deepa de...@robosoftin.com wrote:
 
 
 The CoreGraphics-Dev is not getting listed under Apple Mailing lists. Could 
 you please mention the steps to register to this category of Apple Mailing 
 list?
 
 I think he meant quartz-dev.
 
 --Kyle Sluder

---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: original image size is not retained when it is exported as PDF using CGImageDestinationRef

2011-02-28 Thread Deepa
Hi David,

Thank you for the response.

On 01-Mar-2011, at 2:47 AM, David Duncan wrote:

 
 On Feb 25, 2011, at 4:16 AM, Deepa wrote:
 
 Please correct if I am posting to wrong mailing list.
 
 In general for CG functions, the CoreGraphics-Dev list is a better choice.

The CoreGraphics-Dev is not getting listed under Apple Mailing lists. Could you 
please mention the steps to register to this category of Apple Mailing list?

 
 I am developing a Desktop application that supports exporting an PNG image 
 to different image formats.
 When I export my PNG to (Refer the first link) to PDF format, it appears as 
 shown in link2.
 
 http://www.flickr.com/photos/36018837@N05/5472635835/ (Original Image)
 http://www.flickr.com/photos/36018837@N05/5473232908/ (Exported Image)
 
 In general, you should use a service that allows you to post the actual files 
 involved, as flickr appears to be making it rather difficult to obtain the 
 originals (and I'm not certain if I could obtain a PDF for the exported image 
 or not).
 
 The image has become larger.
 
 
 My first guess would be that the source image has a DPI  72, which would 
 cause its display size to be smaller than that of the PDF. Barring that,

 ImageIO's PDF export may just be to make the image a size that fits the page.

I think the problem might be due to that ImageIO's PDF export may just be to 
make the image a size that fits the page.

 
 I would recommend that rather than allowing ImageIO to export to PDF that you 
 use the CG APIs to generate PDF data yourself, where you can have control 
 over the process.

As you said, I might have to try this out.

 --
 David Duncan
 


Regards,
Deepa
---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Conditionally adding NSButtonCell to a column of NSTableview and allowing button cell to take action even if the corresponding row is not allowed to be selected

2011-02-28 Thread Deepa
Hi,

I am developing an Desktop application for 10.5, 10.6. My requirements are as 
follows:

I am already displaying a NSTableview with one column. The tableview is 
disabled and I do not allow the user to select any row of the tableview. In 
each row of this column I display a NSTextFieldCell.

Now, I want to add one more column that displays NSButtonCell in a row when 
some condition on that row is satisfied. User should be able to click on this 
button and send some action.

If I disable the tableview  or if I do not allow the user to select the row of 
a tableview, the button cell does not take any action. How do I achieve this?

Also, what is the best way to conditionally add a cell to a row?

Thanks in advance.

Regards,
Deepa---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


original image size is not retained when it is exported as PDF using CGImageDestinationRef

2011-02-25 Thread Deepa
Hi,

Please correct if I am posting to wrong mailing list.

I am developing a Desktop application that supports exporting an PNG image to 
different image formats.
When I export my PNG to (Refer the first link) to PDF format, it appears as 
shown in link2.

http://www.flickr.com/photos/36018837@N05/5472635835/ (Original Image)
http://www.flickr.com/photos/36018837@N05/5473232908/ (Exported Image)

The image has become larger.

Why does this happen? Am I doing something wrong in the code? How do I solve 
this?

Following is the code snippet that I use  for export:
//filePath: Destination path
//exportType: kUTTypePDF

CGImageDestinationRef imageDestination = 
CGImageDestinationCreateWithURL((CFURLRef)filePath,(CFStringRef 
)exportType,1,NULL);
BOOL success = NO;

if( imageDestination != NULL )
{
CGImageRef imageRef = [ inImage createCGImage ];
if( imageRef != NULL )
{
CGImageDestinationAddImage(imageDestination, imageRef, NULL); 
success = CGImageDestinationFinalize(imageDestination);
CGImageRelease(imageRef );
 }
 CFRelease( imageDestination );
}

Thanks in advance.

Regards,
Deepa


---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Reading image from system clipboard

2009-08-03 Thread Deepa

Hi,

I am developing an desktop app for which I want to implement a  
behavior which is similar to 'New from clipboard' of Preview  
application.


I tried using NSPasteboard:

// To get file copied to clipboard from Finder
NSArray *files = [[NSPasteboard generalPasteboard]  
propertyListForType: NSFilenamesPboardType];


This returns array of files copied to the clipboard

// To get tiff image
NSData *pbData = [[NSPasteboard generalPasteboard] dataForType:  
NSTIFFPboardType];

CIImage *pbImg = [CIImage imageWithData: pbData];

But this doesn't return null (tiff image data was copied to the  
clipboard).


Am I doing something wrong here???

Can someone help me out to sove this problem. I also wanted to know a  
method which copies and reads jpeg/gif/png image formats to/from  
system clipboard.


Thanks in advance.


Thanks and Regards,
Deepa
de...@robosoftin.com




---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Problem in copying files to the system clipboard

2009-07-31 Thread Deepa

Hi,

I am developing an desktop application in which I want to copy the  
multiple image files to the system clipboard. When I try to paste it  
in the Finder, the image files should be pasted.
This is the behavior similar to Finder Copy-Paste. (I want to copy the  
file paths which when pasted, actual file is pasted; Not file paths in  
text/string format).


I tried using NSFilenamesPboardType, NSFIleContentsPboardType. But  
system clipboard doesn't accept it.


The code using NSFilenamesPboardType:

NSPasteboard *pasteboard =[NSPasteboard pasteboardWithName:  
NSGeneralPboard];
[pasteboard  declareTypes:[NSArray  
arrayWithObjects:NSFilenamesPboardType,nil] owner:nil];
[pasteboard setPropertyList: filePaths forType:  
NSFilenamesPboardType];		// filePaths is array of files paths of images


When I tried to access propertyList from the pasteboard within the  
application, I could get the array of file paths. But, it doesn't add  
anything to the system clipboard. So, I am not able to copy the files  
to the other applications.

(I don't want to use Drag and Drop to support inter-app copy-paste).

Could anyone help me out to solve this problem.

Thanks in advance.

Thanks and Regards,
Deepa
de...@robosoftin.com


---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Web cam: Camera used by another application

2009-06-29 Thread Deepa

Hi,

I am using QTKit APIs for streaming from webcam. I get the error  
message 'Camera used by another application' for some of the webcams.  
But, no other application was using this webcam. The applications like  
Photobooth, iChat can stream properly from this webcam


Following are the steps to stream from the device:

1. Open the input device: [inputDevice open: error]

It opens the device successfully without any error.

2. add input device to capture session: [captureSession addInput:  
inputDevice error: error]



3. Call [captureSession startRunning]

But, it displays a message 'Camera used by another application' in  
QTCaptureView( We are not sure whether it is put up by QTkit framework  
or the webcam driver). We also get the following console log:



usbConnectToCam-USBDeviceOpen: Error: kIOReturnExclusiveAccess -  
exclusive access and device already open


Can anyone help me out to solve this problem.

Thanks in advance,
Deepa
de...@robosoftin.com





---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Query regarding cursor change

2009-04-26 Thread Deepa

Hi,

I am developing an application for Leopard which is similar to the  
feature 'Open a part of this page in Dashboard' in Safari.


In addition to this, I also want to change the cursor when it enters  
specific area.


I have added a transparent window as a child of my Main Window and am  
handling all my drawing(Highlight) in the view added to the child  
window.


But, this child window cannot be made key window in my application for  
the following reasons:

i) Menu validation problems
ii) If web view is placed in main window, scrollbar of the web view  
looks disabled when child window is key window.
iii) If web view is placed in key window, then scrollbar of the web  
view looks disabled when we click on main window.


But, cursor will change only if the child window is key window. Is  
there any other way to track the cursor change.


Can someone help me out to resolve this issue.


Thanks and regards,
Deepa
de...@robosoftin.com



---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


MobileMe API for uploading photos

2009-03-16 Thread Deepa

Hi All,

Are there any APIs available for uploading photos to MobileMe account?

Thanks in advance.

Regards,
Deepa



---
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an 
intended recipient, please notify the sender and delete all copies. Emails to 
and from our network may be logged and monitored. This email and its 
attachments are scanned for virus by our scanners and are believed to be safe. 
However, no warranty is given that this email is free of malicious content or 
virus.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com