Commit Graph

28 Commits

Author SHA1 Message Date
Andreas Färber 561ef251e7 Cocoa: Use optimized drawing for the window
Default is NO.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: malc <av1474@comtv.ru>
2010-01-07 10:57:34 +03:00
Andreas Färber 123810851e Cocoa: Suppress window resize animation
Disable the nice resize animation, to avoid drawing glitches
following a guest's screen size change.

Based on patch by Juha Riihimäki.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Juha Riihimäki <juha.riihimaki@nokia.com>
Cc: Alexander Graf <alex@csgraf.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
Signed-off-by: malc <av1474@comtv.ru>
2010-01-07 10:57:34 +03:00
Andreas Färber 41ea49b328 Cocoa: Shutdown when window is closed
The application is not very useful once the guest window is closed.
QEMU is not a document-based application; terminating it automatically
saves the user another action and resembles SDL behavior.

v2:
- Use delegate method, suggested by Juha Riihimäki.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Juha Riihimäki <juha.riihimaki@nokia.com>
Signed-off-by: malc <av1474@comtv.ru>
2010-01-07 10:57:34 +03:00
Andreas Färber f49188043b Cocoa: Don't unconditionally show the window
When QEMU was launched in no-graphic, Curses or VNC mode,
don't run it as a Cocoa application.

Based on patch by Alexander Graf.

v1:
- Avoid type mismatch warning for argv
- Drop noCocoa variable
- Coding Style changes

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Alexander Graf <agraf@suse.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
Signed-off-by: malc <av1474@comtv.ru>
2010-01-07 10:57:33 +03:00
Andreas Färber 17ccbc27de Cocoa: Redraw the View asynchronously
Cf. http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaPerformance/Articles/CustomViews.html

Based on patch by Juha Riihimäki.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Juha Riihimäki <juha.riihimaki@nokia.com>
Cc: Alexander Graf <alex@csgraf.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
Signed-off-by: malc <av1474@comtv.ru>
2010-01-07 10:57:33 +03:00
Andreas Färber d50f71dc17 Cocoa: Mark the View as opaque
Default is NO.

Cf. http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaPerformance/Articles/CustomViews.html

Based on patch by Juha Riihimäki.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Juha Riihimäki <juha.riihimaki@nokia.com>
Cc: Alexander Graf <alex@csgraf.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
Signed-off-by: malc <av1474@comtv.ru>
2010-01-07 10:57:33 +03:00
Andreas Färber 38ec7b5357 Cocoa: Fix compilation on Mac OS X v10.4 and earlier
NSView's enterFullScreenMode:withOptions: and
exitFullScreenModeWithOptions: are available on v10.5
and later only. Undefined methods raise warnings and
undefined constants result in errors.

Reported by Ryan Schmidt.

While at it, avoid a warning on v10.3.9,
where MAC_OS_X_VERSION_10_4 is not defined.

Spotted by John Arbuckle.

Fix associated comments.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
Cc: Ryan Schmidt <qemu-2009@ryandesign.com>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
Signed-off-by: malc <av1474@comtv.ru>
2010-01-07 10:57:33 +03:00
Andreas Färber fd10a04ef1 Cocoa: Silence type warning
Add const for "qemu" character literal, to avoid:

warning: initialization discards qualifiers from pointer target type

An earlier patch by John proposed to use char[5]. Since we do not modify
the text and later copy it into malloc'ed memory, marking it as const
seems sufficient.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: malc <av1474@comtv.ru>
2010-01-07 10:57:33 +03:00
Andreas Färber 04afa4a88c Cocoa: Silence warning on Big Endian host
__LITTLE_ENDIAN__ is undefined on Big Endian host.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: malc <av1474@comtv.ru>
2010-01-07 10:57:32 +03:00
Andreas Färber 77047bb7c2 Cocoa: Silence warning for cocoa_keycode_to_qemu
Make cocoa_keycode_to_qemu static, to avoid:

warning: no previous prototype for ‘cocoa_keycode_to_qemu’

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: malc <av1474@comtv.ru>
2010-01-07 10:57:32 +03:00
Andreas Färber 44e4c0ba86 Cocoa: ppc64 host support
Fix integer usage in the Cocoa backend: NSInteger is long on LP64.

http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-BBCFHHCD

This makes the graphical display show up on a ppc64 host.

v3:
- Confine NSInteger to Mac OS X v10.5 and later

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: malc <av1474@comtv.ru>
2010-01-07 10:57:32 +03:00
aliguori 9794f74f9c Update cocoa.m to match new DisplayState code (Samuel Benson)
Version 2 does as follows:

[1]: Corrects endianness on issues by using native BGR to RGB conversion
[2]: Uses DisplayState accessors for obtaining graphics context information,
     which
[3]: Removes now unused variables, and
[4]: Allows reading of varying color modes (32bit/24/16), and converting to
     native colorspace
[5]: Attempts to keep itself centered on screen (as opposed to bottom right,
     which immediately goes off screen after bios load) on context changes
    (window resizes)

Testing working on i386 (gentoo, Windows 2000) and PPC (debian) guests on PPC
and x86 Macs.

In regards to [4], Windows 2000 displays fine on quick tests, but on the lowest
setting I could test, 16bit color depth at 4bpp, colors are slightly off. I
used gentoo install-x86-minimal-2008.0 in framebuffer mode to test above
setting; the usual grey text is now blue, and Tux appears to be BGR shifted. I
do not know if previous code worked at such a low color setting.

Signed-off-by: Samuel Benson <qemu_ml@digitalescape.info> 



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6683 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-04 19:25:22 +00:00
aurel32 b94ed5772e Let the USB tablet reach the far bottom and right pixels
(Samuel Thibault)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4036 c046a42c-6fe2-441c-8c8c-71466251a162
2008-03-10 19:34:27 +00:00
ths c304f7e23d Core Graphics support (cocoa.m rewrite), by Mike Kronenberg.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3929 c046a42c-6fe2-441c-8c8c-71466251a162
2008-01-22 23:25:15 +00:00
pbrook 87ecb68bdf Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-17 17:14:51 +00:00
ths 3b46e62427 find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-17 08:09:54 +00:00
ths 5fafdf24ef find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-16 21:08:06 +00:00
blueswir1 b29169d265 Attempt to fix incorrect colours on some BGR displays
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2974 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-10 16:07:38 +00:00
bellard 5cbfcd00b0 cocoa monitor fix regarding the handling of dead keys (Joachim Henke)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1975 c046a42c-6fe2-441c-8c8c-71466251a162
2006-06-14 15:53:24 +00:00
bellard cae41b10a4 fix missing type declarations (Joachim Henke)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1932 c046a42c-6fe2-441c-8c8c-71466251a162
2006-05-22 21:25:04 +00:00
pbrook 8606e5b450 Remove stray "}".
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1817 c046a42c-6fe2-441c-8c8c-71466251a162
2006-04-16 13:34:44 +00:00
pbrook 95219897ff Allow multiple graphics devices.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1803 c046a42c-6fe2-441c-8c8c-71466251a162
2006-04-09 01:06:34 +00:00
bellard 7c206a754a (Joachim Henke)
- suppress unwanted kernel logs
- avoids passing modifier keys to the guest OS when typing in the Monitor
- fixes the bug that the mouse cursor grab is released with _any_ modifier key
  (should be only ctrl+alt)
- removes some code redundancies


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1721 c046a42c-6fe2-441c-8c8c-71466251a162
2005-12-18 19:18:45 +00:00
bellard 87f48e6a1a fixed/full keyboard input - full mouse support - support for qemu console (Mike Kronenberg)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1582 c046a42c-6fe2-441c-8c8c-71466251a162
2005-10-30 18:24:49 +00:00
bellard 7a674b1363 accept more disk image extensions (David Still)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1359 c046a42c-6fe2-441c-8c8c-71466251a162
2005-04-07 20:36:50 +00:00
bellard 5a246934eb open the dialog box if an image was not selected from command-line (Pierre d'Herbemont)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1358 c046a42c-6fe2-441c-8c8c-71466251a162
2005-04-07 20:35:06 +00:00
bellard da4dbf742d cocoa tiny fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1322 c046a42c-6fe2-441c-8c8c-71466251a162
2005-03-02 22:22:43 +00:00
bellard 5b0753e0d8 initial Cocoa support (Pierre d'Herbemont)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1313 c046a42c-6fe2-441c-8c8c-71466251a162
2005-03-01 21:37:28 +00:00