Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Events

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Carbon
Mac Carbon  
Author Message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Fri Apr 06, 2007 5:53 pm    Post subject: Events Reply with quote

ADC: Processing Events Manually

Code:
OSStatus ReceiveNextEvent(
            UInt32               inNumTypes,
            const EventTypeSpec *inList,
            EventTimeout         inTimeout,
            Boolean              inPullEvent,
            EventRef            *outEvent
);


"ReceiveNextEvent runs the low-level event loop, placing events as they
occur into the event queue. The function returns when an event you specified
occurs, or when the specified timeout is exceeded."

ADC: Modal Event States

"If you need to create application-modal dialogs, you can use several
Carbon Event Manager functions to enter and exit the modal state."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Thu Apr 12, 2007 12:15 am    Post subject: Reply with quote

ADC: QA1453 - How can I handle smooth mouse wheel scrolling?

"Smooth scrolling on Mac OS X is available when using the Mighty Mouse or
the scrolling trackpad hardware of 2005 PowerBooks."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Fri Apr 20, 2007 4:45 pm    Post subject: Reply with quote

#include <PMCore.h>
#include <PMApplication.h>
#include <PMDefinitions.h>

RunApplicationEventLoop() - Carbon Event Manager Reference

Code:
void RunApplicationEventLoop (void);

"Note that calling RunApplicationEventLoop also installs the standard
application handler, which provides standard handler responses for menu
and application events."


RunAppModalLoopForWindow() - Carbon Event Manager Reference

Code:
OSStatus RunAppModalLoopForWindow (WindowRef inWindow);

"This function is used as a replacement for the Dialog Manager function
ModalDialog() to drive a Carbon Event-based modal dialog."
To exit out
of it call QuitAppModalLoopForWindow().
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Fri Apr 20, 2007 5:23 pm    Post subject: Reply with quote

ConvertEventRefToEventRecord() - Carbon Event Manager Reference

Code:
Boolean ConvertEventRefToEventRecord (EventRef inEvent, EventRecord *outEvent);


"Converts an event reference into an event record if the event can be converted. If not, the function returns false and outEvent contains nullEvent.

This function can convert the following events:
• kEventMouseDown, kEventMouseUp, kEventMouseMoved, and kEventMouseDragged (kEventClassMouse)
• kEventRawKeyDown, kEventRawKeyUp, and kEventRawKeyRepeat (kEventClassKeyboard)
• kEventWindowUpdate, kEventWindowActivate, kEventWindowDeactivate, and kEventWindowCursorChange (kEventClassWindow)
• kEventAppActivated and kEventAppDeactivate (kEventClassApplication)
• kEventAppleEvent (kEventClassAppleEvents)
• kEventControlTrack (kEventClassControl) is converted to a mouse down event in Mac OS X v10.4 and later."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Fri May 04, 2007 9:11 pm    Post subject: Reply with quote

ADC: WaitNextEvent - Event Manager Reference (Not Recommended)

"The WaitNextEvent function calls the Operating System Event Manager
function SystemEvent to determine whether the event should be handled by
the application or the Operating System.

If no events are pending for your application, WaitNextEvent waits for a
specified amount of time for an event."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat May 26, 2007 1:56 pm    Post subject: Reply with quote

How to GetNextEvent in XCode

"So I need to write code that will grab the event stream watch for a barcode
then bring FileMaker to the front and type the Cmd-1. What I read about
Carbon and Cocoa is that only events that occur in an apps own windows are
sent to the app."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Thu Jul 19, 2007 11:46 pm    Post subject: Reply with quote

How to add option-or-control keyboard equivalents?

"The reason why even though SetMenuItemModifiers correctly added
control-or-option-type keyboard equivalents to my menu but they didn't
appear to work is that elsewhere in my code I was using MenuKey()
instead of MenuEvent(). MenuKey is oblivious to the state of the
control, option and shift keys. I switched my code to use MenuEvent(),
and now it works like a charm."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Tue Nov 27, 2007 8:22 pm    Post subject: Reply with quote

adc - Quartz Event Services Reference

"This document describes the C API for event taps, which are filters used to
observe and alter the stream of low-level user input events in Mac OS X.
Event taps make it possible to monitor and filter input events from several
points within the system, prior to their delivery to a foreground application.

Event taps complement and extend the capabilities of the Carbon event
monitor mechanism, which allows an application to observe input events
delivered to other processes (see the function GetEventMonitorTarget)."
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Sun Dec 02, 2007 8:14 pm    Post subject: Reply with quote

Me and Mark Publishing: Reading the Keyboard with Carbon Events

"An easy and efficient way to support the keyboard is with Carbon events.
This article shows you how to use Carbon events to read the keyboard and
provides an introduction to Carbon events for general application developers."


Me and Mark Publishing: Carbon Event Timers

"This article provides an introduction to Carbon event timers. After reading
the article you will know how to write an event timer, install it, start it, and
stop it."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Wed May 27, 2009 1:11 pm    Post subject: Reply with quote

Erik J. Gustafson - MacBook Multitouch

"Here's code to read the raw gesture data from a MacBook trackpad."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> Mac Carbon All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group