TAILIEUCHUNG - Creating Applications with Mozilla-Chapter 12. Remote Applications-P5

Tham khảo tài liệu 'creating applications with mozilla-chapter 12. remote applications-p5', công nghệ thông tin, quản trị web phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 12. Remote Applications-P5 . Signed Remote Snake Game In this section we look at an enhanced version of the Snake game presented earlier in the chapter. The enhanced version uses XPConnect to provide a total full-screen display of the game on the Windows platform as a remote application. . How to Expand Mozilla to Full Screen The best way to expand Mozilla to a full screen mode is through full-screen functions provided in an instance of . These functions run in the Windows build of Mozilla via the Full Screen item in the View menu. These functions also work in Linux and Mac but do not provide 100 fullscreen mode as some menus and titlebars still show. The problem here is the current window s document which needs to be accessed to get these full-screen functions. A document loaded in that window just can t use something like to get to it so another route must be found. This route runs through the nsIWindowMediator interface by the way of XPConnect. It gives access to the current browser window s document s window object. Example 12-13 includes the code for this window access process along with the functions used to create the full-screen effect. Example 12-13. Function for switching screen modes UniversalXPConnect const MEDIATOR_CONTRACTID @ appshell window-mediator 1 const nsIWindowMediator diator var windowManager MEDIATOR_CONTRACTID .getService nsIWindowMediator var hideSidebar true var isRegular true function switchScreen if isRegular try UniversalXPConnect mainWindow navigator browse r catch e alert e if hideSidebar false if hideSidebar true false .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.