Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.7KB

  1. /*
  2. Copyright 2012 David Robillard <http://drobilla.net>
  3. Copyright 2013 Fil...
  4. Permission to use, copy, modify, and/or distribute this software for any
  5. purpose with or without fee is hereby granted, provided that the above
  6. copyright notice and this permission notice appear in all copies.
  7. THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. /**
  16. @file pugl_osx_extended.m Extended OSX/Cocoa Pugl Implementation.
  17. */
  18. #import "pugl_osx.m"
  19. #include "pugl_osx_extended.h"
  20. void puglImplFocus(PuglView* view)
  21. {
  22. // TODO
  23. }
  24. void puglImplSetSize(PuglView* view, unsigned int width, unsigned int height)
  25. {
  26. id window = view->impl->window;
  27. // TODO
  28. // NSRect frame = [window frame];
  29. // frame.size.width = width;
  30. // frame.size.height = height;
  31. // display:NO ?
  32. // [window setFrame:frame display:YES animate:NO];
  33. }
  34. void puglImplSetTitle(PuglView* view, const char* title)
  35. {
  36. id window = view->impl->window;
  37. NSString* titleString = [[NSString alloc]
  38. initWithBytes:title
  39. length:strlen(title)
  40. encoding:NSUTF8StringEncoding];
  41. [window setTitle:titleString];
  42. }
  43. void puglImplSetVisible(PuglView* view, bool yesNo)
  44. {
  45. id window = view->impl->window;
  46. if (yesNo) {
  47. [window setIsVisible:YES];
  48. } else {
  49. [window setIsVisible:NO];
  50. }
  51. }