GText.swift 867 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * ImageMeter confidential
  3. *
  4. * Copyright (C) 2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany
  5. * All Rights Reserved.
  6. *
  7. * NOTICE: All information contained herein is, and remains the property
  8. * of Dirk Farin. The intellectual and technical concepts contained
  9. * herein are proprietary to Dirk Farin and are protected by trade secret
  10. * and copyright law.
  11. * Dissemination of this information or reproduction of this material
  12. * is strictly forbidden unless prior written permission is obtained
  13. * from Dirk Farin.
  14. */
  15. import Foundation
  16. public class GText {
  17. var gtext : OpaquePointer;
  18. init (elem : GElement) {
  19. gtext = IM_GText_from_GElement(elem.getCPtr())
  20. }
  21. deinit {
  22. IM_GText_release(gtext)
  23. }
  24. func set_text(text : String) {
  25. IM_GText_set_text(gtext, UnsafePointer(text))
  26. }
  27. }