TweetFollow Us on Twitter

MACINTOSH C CARBON
MACINTOSH C CARBON: A Hobbyist's Guide To Programming the Macintosh in C
Version 1.0
2001 K. J. Bricknell
Go to Contents Go to Program Listing

CHAPTER 16

MORE ON WINDOWS

Introduction

As stated at Chapter 4, Mac OS 8.5 introduced a number of new features and associated system software functions to the Window Manager. The new functions associated with zooming and re-sizing windows were addressed at Chapter 4. This chapter addresses the remaining additional features, which include:

  • Support for:

    • Floating windows.

    • Window proxy icons.

    • Window path pop-up menus.

    • Transitional window animations and sounds.

  • New functions for:

    • Creating and storing windows.

    • Accessing window information.

    • Moving and positioning windows.

    • Associating data with a window.

    • Adding and removing rectangles and regions to and from a window's update region.

    • Setting the colour or pattern of a window's content region.

This chapter also addresses additional features introduced with Carbon and live window resizing introduced with Mac OS X.

Floating Windows

Floating windows are windows that stay in front of all of an application's document windows. They are typically used to display tool, pattern, colour, and other choices to be made available to the user. Examples of floating windows are shown at Fig 1.

In terms of front-to-back ordering, floating windows, unlike document windows, are all basically equal. Unless they actually overlap each other, there is no visual cue of any front-to-back ordering as there is with normal windows (see Fig 1). Because of this equality, floating windows almost always appear in the active state. The exception is when a modal or movable modal dialog or alert is presented to the user. When this occurs, the appearance of all floating windows changes to reflect the inactive state.

Floating Window Types

The sixteen available window types for floating windows are shown at Figs 4 and 5 at Chapter 4.

Opening, Closing, Showing, and Hiding Floating Windows

Floating windows may be created using the function CreateNewWindow (see below) with the constant kFloatingWindowClass passed in the windowClass parameter.

When a floating window is created, it should remain open until the application is closed, and your application should provide the user with a means to hide or show the window as and when required. Ordinarily, it should do this by providing an item in an appropriate menu which allows the user to toggle the window between the hidden and showing states.

A floating window's close box/button should simply hide the window, not close it. For that reason, the close box/button in floating windows should be conceived of as a "hide" box/button rather than as a close box/button.

Floating windows should be hidden when the application receives a suspend event. This is to avoid user confusion arising from one application's floating windows being visible when another application is in the foreground. The application's floating windows should be shown again only when the application receives a subsequent resume event.

In Carbon applications, floating windows are hidden and shown automatically on suspend and resume events. It is thus not necessary for Carbon applications to call HideFloatingWindows and ShowFloatingWindows.

Functions Relating to Floating Windows

The following function is relevant to floating windows:

Function

Description

AreFloatingWindowsVisible

Indicates whether an application's floating windows are visible.

Utility and Toolbar Windows

Carbon introduced the utility window (a system-wide floating window which floats above all other windows) and the toolbar window, which floats above all document windows in an application but below floating windows. (See Window Class Constants, below.)

Window Proxy Icons

Window proxy icons are small icons displayed in the title bar of document windows. Ordinarily, a specific document file is associated with a specific window, and the proxy icon serves as a proxy for the document file's icon in the Finder.

Proxy icons:

  • May be dragged, in the same way that the document's icon in the Finder may be dragged, so as to move or copy the document file.

  • Provide visual feedback to the user on the current state of the document. For example, when the document has unsaved changes, your application should cause the proxy icon to be displayed in the disabled state, thus preventing the user from dragging it. (Unsaved documents should not be capable of being moved or copied.)

  • Provide visual feedback to the user indicating that the document window is a valid drag-and-drop target. In this case, your application should cause the proxy icon to appear in the highlighted state.

Fig 2 shows a typical window proxy icon for a document in the enabled, disabled, and highlighted states.

At Fig 2, note that, in the drag and drop operation depicted at the right, the window's content area is highlighted along with the proxy icon. Applications typically call the Drag Manager function ShowDragHilite to indicate, with this highlighting, that a window is a valid drag-and-drop target. ShowDragHilite and HideDragHilite highlight and unhighlight the proxy icon as well as the content area.

Changing the State of a Proxy Icon

Applications typically keep track of the modification state of a document so as to, for example, inform users that they has made changes to the document which they might wish to save before closing the document's window. When a document has unsaved changes, your application should call SetWindowModified with true passed in the modified parameter to cause the proxy icon to appear in the disabled state. . (On Mac OS X, this is accompanied by a dot appearing in the middle of the close button.) When the changes have been saved, your application should call SetWindowModified with false passed in the modified parameter to cause the proxy icon to appear in the enabled state.

Handling Mouse-Down Events in a Window Proxy Icon

When a mouse-down event occurs in your application's window, and when FindWindow returns the inProxyIcon result code, your application should simply call TrackWindowProxyDrag. TrackWindowProxyDrag handles all aspects of the drag process while the user drags the proxy icon.

Proxy Icons and File Synchronisation Functions

It is always possible that, while a document file is open, the user may drag its Finder icon to another folder (including the Trash) or change the name of the file via the Finder icon. The application itself has no way of knowing that this has happened and will assume, unless it is informed otherwise, that the document's file is still at its original location with its original name. For this reason applications often include a frequently-called file synchronisation function which synchronises the application with the actual current location (and name) of its currently open document files.

A document's proxy icon is much more prominent to the user than the document's Finder icon. Thus, when proxy icons are used, there is an even a greater possibility that the user will move the file represented by the proxy icon to a different folder while the document is open. The provision of a file synchronisation function is therefore imperative when proxy icons are implemented.

File synchronisation functions are addressed at Chapter 18.

Functions Relating to Window Proxy Icons

The following functions are relevant to window proxy icons:

Function

Description

SetWindowProxyCreatorAndType

Sets the proxy icon for a window that has no associated file.

New untitled windows should have a proxy icon so as to be consistent, in terms of appearance, with other windows.

SetWindowProxyFSSpec

Associates a file with a window using a file system specification (FSSpec) structure, thus establishing a proxy icon for the window.

GetWindowProxyFSSpec

Gets a file system specification (FSSpec) structure for the file associated with a window.

SetWindowProxyAlias

Associates a file with a window using a handle to an AliasRecord structure, thus establishing a proxy icon for the window.

GetWindowProxyAlias

Gets alias data for the file associated with a window.

SetWindowProxyIcon

Overrides the default proxy icon for a window.

GetWindowProxyIcon

Gets a window's proxy icon.

RemoveWindowProxy

Dissociates a file from a window.

TrackWindowProxyDrag

Handles all aspects of the drag process when a proxy icon is dragged by the user.

Note that SetPortWindowPort (or SetPort) should be called to set the relevant window's graphics port as the current port before calling SetWindowProxyCreatorAndType, SetWindowProxyFSSpec, SetWindowProxyAlias, and SetWindowProxyIcon.

Window Path Pop-Up Menus

If your application supports window path pop-up menus, when the user presses the Command key and clicks a window's title, your window displays a pop-up menu containing a standard file system path. The pop-up menu allows the user to open windows for folders along the file system path. An example of a window path pop-up menu is shown at Fig 3.

Displaying and Handling a Window Path Pop-Up Menu

The proxy icon region overlays the title text region which, in turn, overlays the drag region (see Fig 4). Your application must be prepared to respond to a Command-click in either region.

When FindWindow returns the inProxyIcon part code, and TrackWindowProxyDrag returns errUserWantsToDragWindow, your application should proceed on the assumption that the inDrag part code was returned by FindWindow.

When FindWindow returns the inDrag part code, your application should call IsWindowPathSelectClick to determine whether the mouse-down event should activate the window path pop-up menu. If IsWindowPathSelectClick returns true, WindowPathSelect should be called to display the menu.

If the user chooses a menu item for a folder, your application must ensure that the associated window is visible by calling a function which makes the Finder the frontmost process.

Window path pop-up menus are demonstrated at the demonstration program associated with Chapter 18.

Transitional Window Animation and Sounds

On Mac OS 8/9, prior to Mac OS 8.5, the Window Manager supported the playing of a sound to accompany the animation that occured when a user clicked a window's collapse box. Mac OS 8.5 added support for animation and sounds to accompany the hiding and showing of windows.

The function TransitionWindow may be used in lieu of the older functions HideWindow and ShowWindow to hide and show windows. TransitionWindow causes a transitional animation to be displayed, a transitional sound to be played (on Mac OS 8/9), and the necessary update and activate events to be generated.

Creating and Storing Windows

Mac OS 8.5 provides the following functions for creating and storing windows:

Function

Description

CreateNewWindow

Creates a window from parameter data.

CreateWindowFromResource

Creates a window from 'wind' resource data.

CreateWindowFromCollection

Creates a window from collection data.

StoreWindowIntoCollection

Stores data describing a window into a collection.

Use of the last three of these functions requires a basic understanding of collections, flattened collections and 'wind' resources.

Collections, Flattened Collections, and 'wind' Resources

Collections

A collection object (or, simply, a collection) is an abstract data type that allows you to store multiple pieces of related information.

A collection is like an array in that it contains a number of individually accessible items. However, unlike an array, a collection allows for a variable number of data items and variable-size items. A collection is also similar to a database, in that you can store information and retrieve it using a variety of search mechanisms.

The internal structure of a collection is private. This means that you must store information into a collection and retrieve information from it using Collection Manager functions.

Your application can store a window into a collection using the function StoreWindowIntoCollection. (This applies to any window, not just windows created using the new functions introduced with Mac OS 8.5.) Data associated with the window (for example, text) may also be stored into the same collection.

Using the function CreateWindowFromCollection, you can create a window from collection data. Note that CreateWindowFromCollection creates the window invisibly. After creating the window, you must call the function TransitionWindow to display the window.

Flattened Collections

Using the Collection Manager, you application can create a flattened collection from a collection. A flattened collection is a stream of address-independent data.

The 'wind' Resource

The 'wind' resource consists of an extensible flattened collection. Using the Resource Manager, your application can store a flattened collection, consisting of a window and its data, into a 'wind' resource.

Using the function CreateWindowFromResource, you can create a window from a 'wind' resource. Note that CreateWindowFromResource creates the window invisibly. After creating the window, you must call the function TransitionWindow to display the window.

The CreateNewWindow Function

The function CreateNewWindow creates a window based on the class and attributes you specify in the windowClass and attributes parameters. The following constants may be passed in these parameters.

Window Class Constants

Constant

Value

Description

kAlertWindowClass 1L

Alert window.

kMovableAlertWindowClass 2L

Movable alert window.

kModalWindowClass 3L

Modal dialog window.

kMovableModalWindowClass 4L

Movable modal dialog window.

kFloatingWindowClass 5L

Floating window.

kDocumentWindowClass 6L

Document window or modeless dialog window.

Note: The Window Manager assigns this class to windows created using the older window creation functions.

kUtilityWindowClass 8L

System-wide floating window.

kHelpWindowClass 9L

Help window.

kSheetWindowClass 10L

Sheet window. (Mac OS X only.)

kToolbarWindowClass 11L

Toolbar windows (above documents, below floating windows).

kPlainWindowClass 13L

Plain window (in document layer).

kOverlayWindowClass 14L

Transparent window which allows "screen" drawing via CoreGraphics. (Mac OS X only.)

kSheetAlertWindowClass 15L

Sheet windows for alerts. (Mac OS X only.)

kAltPlainWindowClass 16L

Alternate plain window (in document layer).

kAllWindowClasses 0xFFFFFFFF

For use with GetFrontWindowOfClass, FindWindowOfClass, GetNextWindowOfClass (see below).

Window Attribute Constants

Constant

Bit

Description

kWindowNoAttributes 0L

No attributes.

kWindowCloseBoxAttribute 1L << 0

Has close box/button.

kWindowHorizontalZoomAttribute 1L << 1

Has horizontal zoom box.

kWindowVerticalZoomAttribute 1L << 2

Has vertical zoom box.

kWindowFullZoomAttribute kWindowVerticalZoomAttribute | kWindowHorizontalZoomAttribute

Has full zoom box/zoom button.

kWindowCollapseBoxAttribute 1L << 3

Has a collapse box/minimise button.

kWindowResizableAttribute 1L << 4

Has size box/resize control.

kWindowSideTitlebarAttribute 1L << 5

Has side title bar. This attribute may be applied only to floating windows.

kWindowNoUpdatesAttribute 1L << 16

Does not receive update events.

kWindowNoActivatesAttribute 1L << 17

Does not receive activate events.

kWindowNoShadowAttribute 1L << 21

No shadow. (Mac OS X only.)

kWindowHideOnSuspendAttribute 1L << 24

Window is automatically hidden and shown on, respectively, suspend and shown on resume. (Carbon only.)

kWindowStandardHandlerAttribute 1L << 25

Window should have standard window event handler installed.

kWindowHideOnFullScreenAttribute 1L << 26

Window is automatically hidden during fullscreen mode.

kWindowInWindowMenuAttribute 1L << 27

Window is automatically tracked in Window menu. (Document windows are automatically given this attribute.)

kWindowLiveResizeAttribute 1L << 28

Window supports live resizing. (Mac OS X only.)

kWindowStandardDocumentAttributes kWindowCloseBoxAttribute | kWindowFullZoomAttribute | kWindowCollapseBoxAttribute | kWindowResizableAttribute

Has standard document window attributes, that is, close box, full zoom box, collapse box and size box.

kWindowStandardFloatingAttributes kWindowCloseBoxAttribute | kWindowCollapseBoxAttribute

Has standard floating window attributes, that is, close box and collapse box.

Note that CreateNewWindow creates the window invisibly. After creating the window, you must call the function TransitionWindow to display the window.

Accessing Window Information

The following functions are provided for accessing window information:

Function

Description

GetWindowClass

Obtains the class of a window.

GetWindowAttributes

Obtains the attributes of a window.

ChangeWindowAttributes

Change the attributes of a window.

IsValidWindowPtr

Reports whether a reference is a valid window reference.

FrontNonFloatingWindow

Returns a reference to the application's frontmost window that is not a floating window.

FindWindowOfClass

A version of the FindWindow function which limits the search to windows of one particular class. If a window is found at the specified point, but is not of the specified class, errWindowNotFound is returned and the value of outWindow is set to NULL.

GetFrontWindowOfClass

A more explicit version of the FrontWindow and FrontNonFloatingWindow functions.

GetNextWindowOfClass

A more explicit version of the function GetNextWindow.

Moving and Positioning Windows

Moving Windows

When your application wishes to move a window for a reason other than a user-instigated drag, it should use the function MoveWindowStructure or the earlier function MoveWindow. MoveWindow repositions a window's content region, whereas MoveWindowStructure repositions a window's structure region.

The function SetWindowBounds provides a means to set the size of a window in addition to simply repositioning it. The size and position of the window are specified in a rectangle passed in the globalBounds parameter. In addition, you may specify whether this rectangle represents the bounds of the content region or the bounds of the structure region by passing either kWindowContentRgn or kWindowStructureRgn in the regionCode parameter. The sister function GetWindowBounds obtains the size and position of the bounding rectangle of the specified window region.

Positioning Windows

Generally speaking, a new window should be placed on the desktop where the user expects it to appear. For new document windows, this usually means just below and to the right of the last document window in which the user was working, although this is not necessarily the case on systems with multiple monitors.

The function RepositionWindow allows you to position a window relative to another window or a display screen. The required window positioning method may be specified by passing one of the following constants in the method parameter.

Window Positioning Constants

Constant

Value

Description

kWindowCenterOnMainScreen 0x00000001

The window is centered on the screen that contains the menu bar.

kWindowCenterOnParentWindow 0x00000002

The window is centered on the parent window. If the window to is wider than the parent window, its left edge is aligned with the parent window's left edge.

kWindowCenterOnParentWindowScreen 0x00000003

The window is centered on the screen containing the parent window.

kWindowCascadeOnMainScreen 0x00000004

The window is placed just below the menu bar at the left edge of the main screen. Subsequent windows are placed relative to the first window in such a way that the frame of the preceding window remains visible behind the current window.

kWindowCascadeOnParentWindow 0x00000005

The window is placed below and to the right of the upper-left corner of the parent window in such a way that the frame of the parent window remains visible behind the current window.

kWIndowCascadeOnParentWindowScreen 0x00000006

The window is placed just below the menu bar at the left edge of the screen that contains the parent window. Subsequent windows are placed on the screen relative to the first window in such a way that the frame of the preceding window remains visible behind the current window.

kWindowAlertPositionOnMainScreen 0x00000007

The window is centered horizontally, and positioned vertically, on the screen that contains the menu bar in such a way that about one-fifth of the screen is above it.

kWindowAlertPositionOnParentWindow 0x00000008

The window is centered horizontally, and positioned vertically, in such a way that about one-fifth of the parent window is above it.

kWindowAlertPositionOnParentWindowScreen 0x00000009

The window is centered horizontally, and positioned vertically, in such a way that about one-fifth of the screen containing the parent window is above it.

These constants should not be confused with the older positioning specification constants (see Chapter 4), and should not be used where those older constants are required (for example, in 'WIND', 'DLOG', and 'ALRT' resources, and in the StandardAlert function).

Associating Data With Windows

The function SetWRefCon has always allowed your application to associate a pointer to data with a reference to a window object. An alternative method of associating data with windows is to use the standard mechanism introduced with Mac OS 8.5. (Both methods, incidentally, are Carbon-compliant.)

The following functions are provided for associating data with windows:

Function

Description

SetWindowProperty

Associates data with a window.

GetWindowProperty

Gets data associated with a window.

GetWindowPropertySize

Gets the size of data associated with a window.

RemoveWindowProperty

Removes data associated with a window.

Adding To and Removing From the Update Region

The Mac OS 8.5 Window Manager provided enhanced functions for manipulating the update region. Unlike their pre-Mac OS 8.5 counterparts (InvalRect, InvalRgn, ValidRect, and ValidRgn, which are not included in the Carbon API), the new functions allow the window on which they operate to be explicitly specified, meaning that they do not require the graphics port to be set prior to their use.

The following are the functions for manipulating the update region:

Function

Description

InvalWindowRect

Adds a rectangle to the window's update region.

InvalWindowRgn

Adds a region to the window's update region.

ValidWindowRect

Removes a rectangle from the window's update region.

ValidWindowRgn

Removes a region from the window's update region.

Setting Content Region Colour and Pattern

The following functions set the colour or pattern of a window's content region:

Function

Description

SetWindowContentColor

Sets the colour to which a window's content region is redrawn on receipt of an update event.

GetWindowContentColor

Obtains the colour to which a window's content region is redrawn.

SetWindowContentPattern

Sets the pattern to which a window's content region is redrawn on receipt of an update event.

GetWindowContentPattern

Obtains the pattern to which a window's content region is redrawn.

These functions do not affect the graphics port's background colour or pattern.

Window Scrolling

The following functions scroll pixels within a window:

Function

Description

ScrollWindowRect
ScrollWindowRegion

Scrolls pixels that are inside the specified rectangle (ScrollWindowRect) or region (ScrollWindowRegion).

The pixels are shifted a distance of inHPixels horizontally and inVPixels vertically. The positive directions are to the right and down. The pixels that are shifted out of the specified window are not displayed, and the bits they represent are not saved. The exposed empty area created by the scrolling may be added to the update region or erased to the background colour/pattern of the window's graphics port.

The following constants may be passed in the inOptions parameter of these functions:

Function

Description

kScrollWindowNoOptions

No options.

kScrollWindowInvalidate

Add the exposed area to the windows update region.

kScrollWindowEraseToPortBackground

Erase the exposed area using the background colour/pattern of the windows graphics port.

Window Menu

Carbon introduced the system-managed Window menu, which is created using the function CreateStandardWindowMenu. After creating the menu you should add it to the menu list using InsertMenu. Menu items containing the titles of your application's windows will be automatically added to, and deleted from, the menu when those windows are created and closed. Floating windows will not be added to the menu.

It is not necessary to set the kWindowInWindowMenuAttribute attribute on your document windows in order for them to be added to the menu. Document windows are automatically given this attribute.

Using SetWindowAlternateTitle you can override the title displayed in the Window menu. You would ordinarily do this if the window title was not expressive enough.

Customising the Window Menu

You can insert your own items to the Window menu by searching for the item with command ID 'wldv' and inserting your items before that item (that is, immediately before the individual window items). 'wldv' is the command ID of the divider that separates the window commands from the individual window items.

A problem here is that, at the time of writing, the divider had the 'wldv' command ID on Mac OS X but not in CarbonLib.

You can append your own items at the end of the Window menu by searching for the item with command ID 'wlst' and appending your items after that item. 'wlst' is the command ID of a hidden menu item that marks the end of the individual window items.

Live Window Resizing

On Mac OS X, windows on which the kWindowLiveResizeAttribute attribute is set support live resizing. When this attribute is set, the window is continually redrawn while it is being resized, as opposed to just outlines of the window, title bar, and resize control being drawn. Full implementation of live resizing requires that the contents of the content region also be continually redrawn as the window is being resized. This requires the use of the Carbon event model.

The demonstration program CarbonEvents2 (Chapter 17) demonstrates live resizing.

Main Constants, Data Types, and Functions

Constants

Window Class

KAlertWindowClass         = 1L
kMovableAlertWindowClass  = 2L
kModalWindowClass         = 3L
kMovableModalWindowClass  = 4L
kFloatingWindowClass      = 5L
kDocumentWindowClass      = 6L
kUtilityWindowClass       = 8L
kHelpWindowClass          = 10L
kSheetWindowClass         = 11L
kToolbarWindowClass       = 12L
kPlainWindowClass         = 13L
kOverlayWindowClass       = 14L
kSheetAlertWindowClass    = 15L
kAltPlainWindowClass      = 16L
kAllWindowClasses         = 0xFFFFFFFF

Window Attributes

kWindowNoAttributes                = 0L
kWindowCloseBoxAttribute           = 1L << 0
kWindowHorizontalZoomAttribute     = 1L << 1
kWindowVerticalZoomAttribute       = 1L << 2
kWindowFullZoomAttribute           = kWindowVerticalZoomAttribute |
                                     kWindowHorizontalZoomAttribute
kWindowCollapseBoxAttribute        = 1L << 3
kWindowResizableAttribute          = 1L << 4
kWindowSideTitlebarAttribute       = 1L << 5
kWindowNoUpdatesAttribute          = 1L << 16
kWindowNoActivatesAttribute        = 1L << 17
kWindowNoShadowAttribute           = 1L << 21
kWindowHideOnSuspendAttribute      = 1L << 24
kWindowStandardHandlerAttribute    = 1L << 25
kWindowHideOnFullScreenAttribute   = 1L << 26
kWindowInWindowMenuAttribute       = 1L << 27
kWindowLiveResizeAttribute         = 1L << 28
kWindowStandardDocumentAttributes  = kWindowCloseBoxAttribute |
                                     kWindowFullZoomAttribute |
                                     kWindowCollapseBoxAttribute |
                                     kWindowResizableAttribute
kWindowStandardFloatingAttributes  = kWindowCloseBoxAttribute |
                                     kWindowCollapseBoxAttribute

Window Positioning

kWindowCenterOnMainScreen                 = 0x00000001
kWindowCenterOnParentWindow               = 0x00000002
kWindowCenterOnParentWindowScreen         = 0x00000003
kWindowCascadeOnMainScreen                = 0x00000004
kWindowCascadeOnParentWindow              = 0x00000005
kWIndowCascadeOnParentWindowScreen        = 0x00000006
kWindowAlertPositionOnMainScreen          = 0x00000007
kWindowAlertPositionOnParentWindow        = 0x00000008
kWindowAlertPositionOnParentWindowScreen  = 0x00000009

Window Transition Action and Effect

kWindowShowTransitionAction  = 1
kWindowHideTransitionAction  = 2
kWindowZoomTransitionEffect  = 1

Window Scrolling

KScrollWindowNoOptions              = 0
KScrollWindowInvalidate             = (1L << 0)
KScrollWindowEraseToPortBackground  = (1L << 1)

Data Types

Property Types

typedef OSType PropertyCreator;
typedef OSType PropertyTag;

Window Class and Attributes

typedef UInt32 WindowClass;
typedef UInt32 WindowAttributes;

Window Positioning

typedef UInt32 WindowPositionMethod;

Window Transitioning

typedef UInt32 WindowTransitionEffect;
typedef UInt32 WindowTransitionAction;

Window Scrolling

typedef UInt32 ScrollWindowOptions;

Functions

Floating Windows

Boolean   AreFloatingWindowsVisible(void);

Window Proxy Icons

OSStatus  SetWindowProxyCreatorAndType(WindowRef window,OSType fileCreator,
          OSType fileType,SInt16 vRefNum);
OSStatus  SetWindowProxyFSSpec(WindowRef window,const FSSpec *inFile);
OSStatus  GetWindowProxyFSSpec(WindowRef window,FSSpec *outFile);
OSStatus  GetWindowProxyAlias(WindowRef window,AliasHandle *alias);
OSStatus  SetWindowProxyAlias(WindowRef window,AliasHandle alias);
OSStatus  SetWindowProxyIcon(WindowRef window,IconRef icon);
OSStatus  GetWindowProxyIcon(WindowRef window,IconRef *outIcon);
OSStatus  RemoveWindowProxy(WindowRef window);
OSStatus  TrackWindowProxyDrag(WindowRef window,Point startPt);

Window Path Pop-Up Menus

Boolean   IsWindowPathSelectClick(WindowRef window,EventRecord *event);
OSStatus  WindowPathSelect(WindowRef window,MenuHandle menu,SInt32 *outMenuResult);

Transitional Window Animations and Sounds

OSStatus  TransitionWindow(WindowRef window,WindowTransitionEffect effect,
          WindowTransitionAction action,const Rect *rect);

Creating and Storing Windows

OSStatus  CreateNewWindow(WindowClass windowClass,WindowAttributes attributes,
          const Rect *bounds,WindowRef *outWindow);
OSStatus  CreateWindowFromResource(SInt16 resID,WindowRef *outWindow);
OSStatus  CreateWindowFromCollection(Collectioncollection,WindowRef *outWindow);
OSStatus  StoreWindowIntoCollection(WindowRef window,Collection collection);

Accessing Window Information

OSStatus  GetWindowClass(WindowRef window,WindowClass *outClass);
OSStatus  GetWindowAttributes(WindowRef window,WindowAttributes *outAttributes);
OSStatus  ChangeWindowAttributes(WindowRef window,WindowAttributes setTheseAttributes,
          WindowAttributes clearTheseAttributes);
Boolean   IsValidWindowRef(GrafPtr grafPort);
WindowRef FrontNonFloatingWindow(void);
OSStatus  FindWindowOfClass(const Point *where,WindowClass inWindowClass,
          WindowRef *outWindow, WindowPartCode *outWindowPart)
WindowRef GetFrontWindowOfClass(WindowClass inWindowClass,Boolean mustBeVisible); 
WindowRef GetNextWindowOfClass(WindowRef inWindow,WindowClass inWindowClass,
          Boolean mustBeVisible);

Moving and Positioning Windows

OSStatus  MoveWindowStructure(WindowRef window,short hGlobal,short vGlobal);
OSStatus  SetWindowBounds(WindowRef window,WindowRegionCode regionCode,
          const Rect *globalBounds);
OSStatus  GetWindowBounds(WindowRef window,WindowRegionCode regionCode,
          Rect *globalBounds);
OSStatus  RepositionWindow(WindowRef window,WindowRef parentWindow,
          WindowPositionMethod method);

Associating Data With Windows

OSStatus  SetWindowProperty(WindowRef window,PropertyCreator propertyCreator,
          PropertyTag propertyTag,UInt32 propertySize,void *propertyBuffer);
OSStatus  GetWindowProperty(WindowRef window,PropertyCreator propertyCreator,
          PropertyTag propertyTag,UInt32 bufferSize,UInt32 *actualSize,
          void *propertyBuffer);
OSStatus  GetWindowPropertySize(WindowRef window,PropertyCreator creator,PropertyTag tag,
          UInt32 *size);
OSStatus  RemoveWindowProperty(WindowRef window,PropertyCreator propertyCreator,
          PropertyTag propertyTag);

Adding To and Removing From the Update Region

OSStatus  InvalWindowRect(WindowRef window,const Rect *bounds);
OSStatus  InvalWindowRgn(WindowRef window,RgnHandle region);
OSStatus  ValidWindowRect(WindowRef window,const Rect *bounds);
OSStatus  ValidWindowRgn(WindowRef window,RgnHandle region);

Setting Content Region Colour and Pattern

OSStatus  SetWindowContentColor(WindowRef window,RGBColor *color);
OSStatus  GetWindowContentColor(WindowRef window,RGBColor *color);
OSStatus  GetWindowContentPattern(WindowRef window,PixPatHandle outPixPat);
OSStatus  SetWindowContentPattern(WindowRef window,PixPatHandle pixPat);

Window Scrolling

OSStatus  ScrollWindowRect(WindowRef inWindow,const Rect *inScrollRect,SInt16 inHPixels,
          SInt16 inVPixels,ScrollWindowOptions inOptions,RgnHandle outExposedRgn);
OSStatus  ScrollWindowRegion(WindowRef inWindow,RgnHandle inScrollRgn,SInt16 inHPixels,
          SInt16 inVPixels,ScrollWindowOptions inOptions,RgnHandle outExposedRgn);

Creating a Window Menu

OSStatus  CreateStandardWindowMenu(OptionBits inOptions,MenuRef *outMenu);
OSStatus  SetWindowAlternateTitle(WindowRef inWindow,CFStringRef inTitle);

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

TechTool Pro 9.5.1 - Hard drive and syst...
TechTool Pro has long been one of the foremost utilities for keeping your Mac running smoothly and efficiently. With the release of version 9, it has become more proficient than ever. TechTool... Read more
Jamf Pro 9.99.0 - Powerful sysadmin/ente...
Jamf Pro (formerly Casper Suite) is the EMM tool that delights IT pros and the users they support by delivering on the promise of unified endpoint management for Apple devices. At Jamf, connecting... Read more
VueScan 9.5.78 - Scanner software with a...
VueScan is a scanning program that works with most high-quality flatbed and film scanners to produce scans that have excellent color fidelity and color balance. VueScan is easy to use, and has... Read more
Adobe Lightroom 6.10.1 - Import, develop...
Adobe Lightroom is available as part of Adobe Creative Cloud for as little as $9.99/month bundled with Photoshop CC as part of the photography package. Lightroom 6 is also available for purchase as a... Read more
iPhoto Library Manager 4.2.7 - Manage mu...
iPhoto Library Manager allows you to organize your photos among multiple iPhoto libraries, rather than having to store all of your photos in one giant library. You can browse the photos in all your... Read more
Smultron 9.4 - Easy-to-use, powerful tex...
Smultron 9 is an elegant and powerful text editor that is easy to use. Use it to create or edit any text document. Everything from a web page, a note or a script to any single piece of text or code.... Read more
TextSoap 8.4 - Automate tedious text doc...
TextSoap can automatically remove unwanted characters, fix up messed up carriage returns, and do pretty much anything else that we can think of to text. Save time and effort. Be more productive. Stop... Read more
Merlin Project 4.2.3 - $349.00
Merlin Project is the leading professional project management software for OS X. If you plan complex projects on your Mac, you won’t get far with a simple list of tasks. Good planning raises... Read more
QuarkXPress 13.0.0.0 - Desktop publishin...
QuarkXPress 2017 is the new version that raises the bar for design and productivity. With non-destructive graphics and image editing directly within your layout, you no longer have to choose between... Read more
Path Finder 7.5 - Powerful, award-winnin...
Path Finder makes you a master of file management. Take full control over your file system. Save your time: compare and synchronize folders, view hidden files, use Dual Pane and full keyboard... Read more

Latest Forum Discussions

See All

Zombie Gunship Survival Beginner's...
The much anticipated Zombie Gunship Survival is here. In this latest entry in the Zombie Gunship franchise, you're tasked with supporting ground troops and protecting your base from the zombie horde. There's a lot of rich base building fun, and... | Read more »
Mordheim: Warband Skirmish (Games)
Mordheim: Warband Skirmish 1.2.2 Device: iOS Universal Category: Games Price: $3.99, Version: 1.2.2 (iTunes) Description: Explore the ruins of the City of Mordheim, clash with other scavenging warbands and collect Wyrdstone -... | Read more »
Mordheim: Warband Skirmish brings tablet...
Legendary Games has just launched Mordheim: Warband Skirmish, a new turn-based action game for iOS and Android. | Read more »
Magikarp Jump splashes onto Android worl...
If you're tired ofPokémon GObut still want something to satisfy your mobilePokémon fix,Magikarp Jumpmay just do the trick. It's out now on Android devices the world over. While it looks like a simple arcade jumper, there's quite a bit more to it... | Read more »
Purrfectly charming open-world RPG Cat Q...
Cat Quest, an expansive open-world RPG from former Koei-Tecmo developers, got a new gameplay trailer today. The video showcases the combat and exploration features of this feline-themed RPG. Cat puns abound as you travel across a large map in a... | Read more »
Jaipur: A Card Game of Duels (Games)
Jaipur: A Card Game of Duels 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: ** WARNING: iPad 2, iPad Mini 1 & iPhone 4S are NOT compatible. ** *** Special Launch Price for a limited... | Read more »
Subdivision Infinity (Games)
Subdivision Infinity 1.03 Device: iOS Universal Category: Games Price: $2.99, Version: 1.03 (iTunes) Description: Launch sale! 40% Off! Subdivision Infinity is an immersive and pulse pounding sci-fi 3D space shooter. https://www.... | Read more »
Clash of Clans' gets a huge new upd...
Clash of Clans just got a massive new update, and that's not hyperbole. The update easily tacks on a whole new game's worth of content to the hit base building game. In the update, that mysterious boat on the edge of the map has been repaired and... | Read more »
Thimbleweed Park officially headed to iO...
Welp, it's official. Thimbleweed Park will be getting a mobile version. After lots of wondering and speculation, the developers confirmed it today. Thimbleweed Park will be available on both iOS and Android sometime in the near future. There's no... | Read more »
Pokémon GO might be getting legendaries...
The long-awaited legendary Pokémon may soon be coming to Pokémon GO at long last. Data miners have already discovered that the legendary birds, Articuno, Moltres, and Zapdos are already in the game, it’s just a matter of time. [Read more] | Read more »

Price Scanner via MacPrices.net

Huawei Unveils New ‘Business-Styled’ MateBook...
Huawei has introduced a trio of new MateBook laptops, expanding its mobile portfolio and building on its success in delivering attractive and powerful high-end devices. The company claims the HUAWEI... Read more
Deal! Gold 12-inch 1.2GHz Retina MacBook for...
Amazon has the 2016 Gold 12″ 1.2GHz Retina MacBook (MLHF2LL/A) on sale for $350 off MSRP for a limited time. Shipping is free: - 12″ 1.2GHz Gold Retina MacBook: $1249.99 $350 off MSRP We expect this... Read more
13-inch 2.0GHz MacBook Pros on sale for $100...
B&H has the non-Touch Bar 13″ 2.0GHz MacBook Pros in stock today and on sale for $100 off MSRP. Shipping is free, and B&H charges NY & NJ sales tax only: - 13″ 2.0GHz MacBook Pro Space... Read more
15-inch 2.2GHz Retina MacBook Pro, Apple refu...
Apple has Certified Refurbished 2015 15″ 2.2GHz Retina MacBook Pros available for $1699. That’s $300 off MSRP, and it’s the lowest price available for a 15″ MacBook Pro. An Apple one-year warranty is... Read more
Apple refurbished 9-inch and 12-inch iPad Pro...
Apple has Certified Refurbished 9″ and 12″ Apple iPad Pros available for up to $160 off the cost of new iPads. An Apple one-year warranty is included with each model, and shipping is free: - 32GB 9″... Read more
Apple Certified Refurbished iMacs available f...
Apple has Certified Refurbished 2015 21″ & 27″ iMacs available for up to $350 off MSRP. Apple’s one-year warranty is standard, and shipping is free. The following models are available: - 21″ 3.... Read more
Sale! 15-inch 2.6GHz Silver Touch Bar MacBook...
DataVision has the 15″ 2.6GHz Silver Touch Bar MacBook Pro (MLW72LL/A) on sale for $2199 including free shipping. Their price is $200 off MSRP, and it’s the lowest price available for this model (... Read more
A Kaby Lake Processor Upgrade For The MacBook...
Now they tell me! Well, actually Apple hasn’t said anything official on the subject, but last week Bloomberg News’s Mark Gurman and Alex Webb cited unnamed “people familiar with the matter”... Read more
Kodak’s Camera-First Smartphone EKTRA Launche...
The Eastman Kodak Company and Bullitt Group have announced the availability of a U.S. GSM version of the KODAK EKTRA Smartphone. The U.S. launch coincides with a software update addressing requests... Read more
Apple Launches App Development Curriculum for...
Apple today launched a new app development curriculum designed for students who want to pursue careers in the fast-growing app economy. The curriculum is available as a free download today from Apple... Read more

Jobs Board

*Apple* Retail - Multiple Positions - Apple,...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
*Apple* Retail - Multiple Positions - Apple,...
Job Description:SalesSpecialist - Retail Customer Service and SalesTransform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
*Apple* Systems Engineer - California Polyte...
Cal Poly, San Luis Obispo Apple Systems Engineer Department: ITS - Customer & Tech Support (134900) College/Division: Academic Affairs Salary Range: Position Read more
Best Buy *Apple* Computing Master - Best Bu...
**508718BR** **Job Title:** Best Buy Apple Computing Master **Location Number:** 001526-Odessa-Store **Job Description:** **What does a Best Buy Apple Computing Read more
Data Engineer - *Apple* Media Products - Ap...
Changing the world is all in a day's work at Apple . If you love innovation, here's your chance to make a career of it. You'll work hard. But the job comes with more Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.