/src/backend/iphone/ftk_iphone_view.h

http://ftk.googlecode.com/ · C Header · 36 lines · 25 code · 11 blank · 0 comment · 0 complexity · 9a0a1e41e38cbd36361abebd86fb8423 MD5 · raw file

  1. #ifndef FTK_IPHONE_VIEW_H
  2. #define FTK_IPHONE_VIEW_H
  3. #include "ftk_event.h"
  4. #include "ftk_bitmap.h"
  5. #import <UIKit/UIKit.h>
  6. @interface FtkView : UIView<UITextFieldDelegate>
  7. {
  8. @private
  9. UITextField* text_field;
  10. FtkEvent ev;
  11. }
  12. -(id)initWithFrame:(CGRect)frame;
  13. -(void)drawView:(FtkBitmap*)bitmap rect:(FtkRect*)rect bits:(void*)bits xoffset:(int)xoffset yoffset:(int)yoffset width:(int)width height:(int)height;
  14. -(void)showKeyboard;
  15. -(void)hideKeyboard;
  16. -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
  17. -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
  18. -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
  19. @end
  20. void ftk_iphone_view_create_win(void);
  21. void ftk_iphone_view_destroy_win(void);
  22. void ftk_iphone_view_draw(FtkBitmap* bitmap, FtkRect* rect, void* bits, int xoffset, int yoffset, int width, int height);
  23. void ftk_iphone_view_show_keyboard(void);
  24. void ftk_iphone_view_hide_keyboard(void);
  25. #endif/*FTK_IPHONE_VIEW_H*/