コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
最近の更新
未作成ページ
おまかせ表示
ヘルプ
MonoBook
検索
検索
ログイン
個人用ツール
ログイン
ログアウトした編集者のページ
もっと詳しく
投稿記録
トーク
「
Xamarin.MacでCGSDebugを使う
」を編集中
ページ
議論
日本語
閲覧
編集
ソースを編集
履歴表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
編集
ソースを編集
履歴表示
全般
リンク元
関連ページの更新状況
特別ページ
ページ情報
2017年11月17日 (金) 02:10時点における
imported>Administrator
による版
(
差分
)
← 古い版
|
最新版
(
差分
) |
新しい版 →
(
差分
)
警告: このページの古い版を編集しています。
公開すると、この版以降になされた変更がすべて失われます。
警告:
ログインしていません。編集を行うと、あなたの IP アドレスが公開されます。
ログイン
または
アカウントを作成
すれば、あなたの編集はその利用者名とともに表示されるほか、その他の利点もあります。
スパム攻撃防止用のチェックです。 けっして、ここには、値の入力は
しない
でください!
[[macOS 10.11 (El Capitan)]]以降では動かない模様(落ちたりはしないが常にNoneになる)。 macOS 10.12 (Sierra)でも動かない。 macOS 10.13 (High Sierra)は試していないが99%ダメだろう。 <source lang="csharp"> using System; using System.Runtime.InteropServices; using AppKit; [Flags] public enum CGSDebugOption : uint { /// <summary> /// Clears all flags. /// </summary> None = 0, /// <summary> /// All screen updates are flashed in yellow. Regions under a DisableUpdate are flashed in orange. /// Regions that are hardware accellerated are painted green. /// </summary> FlashScreenUpdates = 0x4, /// <summary> /// Colors windows green if they are accellerated, otherwise red. /// Doesn't cause things to refresh properly - leaves excess rects cluttering the screen. /// </summary> ColorByAccelleration = 0x20, /// <summary> /// Disables shadows on all windows. /// </summary> NoShadows = 0x4000, /// <summary> /// Setting this disables the pause after a flash when using FlashScreenUpdates or FlashIdenticalUpdates. /// </summary> NoDelayAfterFlash = 0x20000, /// <summary> /// Flushes the contents to the screen after every drawing operation. /// </summary> AutoflushDrawing = 0x40000, /// <summary> /// mouse tracking areas. /// Doesn't cause things to refresh correctly - leaves excess rectangles cluttering the screen. /// </summary> ShowMouseTrackingAreas = 0x100000, /// <summary> /// Flashes identical updates in red. /// </summary> FlashIdenticalUpdates = 0x4000000, /// <summary> /// Dumps a list of windows to /tmp/WindowServer.winfo.out. /// This is what Quartz Debug uses to get the window list. /// </summary> DumpWindowListToFile = 0x80000001, /*! Dumps a list of connections to /tmp/WindowServer.cinfo.out. */ DumpConnectionListToFile = 0x80000002, /*! Dumps a very verbose debug log of the WindowServer to /tmp/CGLog_WinServer_<PID>. */ VerboseLogging = 0x80000006, /// <summary> /// Dumps a very verbose debug log of all processes to /tmp/CGLog_<NAME>_<PID>. /// </summary> VerboseLoggingAllApps = 0x80000007, /* > 7 seems like more logging options, perhaps with different verbosity or category */ /// <summary> /// Dumps a list of hotkeys to /tmp/WindowServer.keyinfo.out. /// </summary> DumpHotKeyListToFile = 0x8000000E, /// <summary> /// Dumps a of surfaces to WindowServer.sinfo.out. /// </summary> DumpSurfacesToFile = 0x80000010, /// <summary> /// Dumps information about OpenGL extensions, etc to /tmp/WindowServer.glinfo.out. /// </summary> DumpOpenGLInfoToFile = 0x80000013, /// <summary> /// Dumps a list of shadows to /tmp/WindowServer.shinfo.out. /// </summary> DumpShadowListToFile = 0x80000014, /// <summary> /// Leopard: Dumps information about caches to `/tmp/WindowServer.scinfo.out`. /// </summary> DumpCacheInformationToFile = 0x80000015, /// <summary> /// Leopard: Purges some sort of cache - most likely the same caches dummped with `DumpCacheInformationToFile`. /// </summary> PurgeCaches = 0x80000016, /// <summary> /// Leopard: Dumps a list of windows to `/tmp/WindowServer.winfo.plist`. This is what Quartz Debug on 10.5 uses to get the window list. /// </summary> DumpWindowListToPlist = 0x80000017, /// <summary> /// Leopard: DOCUMENTATION PENDING /// </summary> EnableSurfacePurging = 0x8000001B, // Leopard: 0x8000001C - invalid /// <summary> /// Leopard: DOCUMENTATION PENDING /// </summary> DisableSurfacePurging = 0x8000001D, /// <summary> /// Leopard: Dumps information about an application's resource usage to `/tmp/CGResources_<NAME>_<PID>`. /// </summary> DumpResourceUsageToFiles = 0x80000020, // Leopard: 0x80000022 - something about QuartzGL? /// <summary> /// Leopard: Returns the magic mirror to its normal mode. /// The magic mirror is what the Dock uses to draw the screen reflection. /// For more information, see `CGSSetMagicMirror`. */ /// </summary> SetMagicMirrorModeNormal = 0x80000023, /// <summary> /// Leopard: Disables the magic mirror. It still appears but draws black instead of a reflection. /// </summary> SetMagicMirrorModeDisabled = 0x80000024, /// <summary> /// Snow Leopard: /// </summary> DumpColorProfileInfoToFile = 0x80000029, /// <summary> /// Snow Leopard: /// </summary> DumpShmemInfoToFile = 0x8000002c } static class MainClass { [DllImport("/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/CoreGraphics")] static extern int CGSGetDebugOptions(out CGSDebugOption options); [DllImport("/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/CoreGraphics")] static extern int CGSSetDebugOptions(CGSDebugOption options); static void Main(string[] args) { NSApplication.Init(); // フラグ取得 CGSDebugOption option; CGSGetDebugOptions(out option); Console.WriteLine("old: " + option); // フラグ反転 option = option ^ CGSDebugOption.NoShadows; CGSSetDebugOptions(option); Console.WriteLine("new: " + option); } } </source> [[category: Xamarin.Mac]]
編集内容の要約:
MonoBookへの投稿はすべて、他の投稿者によって編集、変更、除去される場合があります。 自分が書いたものが他の人に容赦なく編集されるのを望まない場合は、ここに投稿しないでください。
また、投稿するのは、自分で書いたものか、パブリック ドメインまたはそれに類するフリーな資料からの複製であることを約束してください(詳細は
MonoBook:著作権
を参照)。
著作権保護されている作品は、許諾なしに投稿しないでください!
このページを編集するには、下記の確認用の質問に回答してください (
詳細
):
1たす1は?(全角で入力してください)
キャンセル
編集の仕方
(新しいウィンドウで開きます)
本文の横幅制限を有効化/無効化