Module: SDL::Mac
- Defined in:
- lib/ruby-sdl-ffi/sdl/mac.rb
Defined Under Namespace
Modules: Cocoa, HIServices, ObjC
Class Method Summary
collapse
Class Method Details
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/ruby-sdl-ffi/sdl/mac.rb', line 53
def ( app_name )
ptr = FFI.find_type(:pointer)
nsapp = Cocoa.NSApp
= Cocoa::NSMenu.new.initWithTitle("AMainMenu")
nsapp.msg( "setMainMenu:", ptr, )
( nsapp, )
( , app_name )
( nsapp, )
nil
end
|
.set_app_name(app_name) ⇒ Object
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# File 'lib/ruby-sdl-ffi/sdl/mac.rb', line 68
def set_app_name( app_name )
ptr = FFI.find_type(:pointer)
if @appmenuitem
@appmenuitem.title = app_name
@hideitem.title = "Hide #{app_name}" if @hideitem
@quititem.title = "Quit #{app_name}" if @quititem
else
( app_name )
end
nil
end
|