fxruby 1.6.40-x86-mingw32 → 1.6.41-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,16 +24,16 @@ end
24
24
  LIBZ_VERSION = ENV['LIBZ_VERSION'] || '1.2.7.3'
25
25
  LIBZ_SOURCE_URI = "http://zlib.net/fossils/zlib-#{LIBZ_VERSION}.tar.gz"
26
26
 
27
- LIBPNG_VERSION = ENV['LIBPNG_VERSION'] || '1.6.36'
27
+ LIBPNG_VERSION = ENV['LIBPNG_VERSION'] || '1.6.37'
28
28
  LIBPNG_SOURCE_URI = "http://prdownloads.sourceforge.net/libpng/libpng-#{LIBPNG_VERSION}.tar.gz"
29
29
 
30
30
  # LIBJPEG_VERSION = ENV['LIBJPEG_VERSION'] || '9b'
31
31
  # LIBJPEG_SOURCE_URI = "http://www.ijg.org/files/jpegsrc.v#{LIBJPEG_VERSION}.tar.gz"
32
32
 
33
- LIBJPEG_VERSION = ENV['LIBJPEG_VERSION'] || '1.5.3'
33
+ LIBJPEG_VERSION = ENV['LIBJPEG_VERSION'] || '2.0.4'
34
34
  LIBJPEG_SOURCE_URI = "https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-#{LIBJPEG_VERSION}.tar.gz"
35
35
 
36
- LIBTIFF_VERSION = ENV['LIBTIFF_VERSION'] || '4.0.10'
36
+ LIBTIFF_VERSION = ENV['LIBTIFF_VERSION'] || '4.1.0'
37
37
  LIBTIFF_SOURCE_URI = "http://download.osgeo.org/libtiff/tiff-#{LIBTIFF_VERSION}.tar.gz"
38
38
 
39
39
  LIBFOX_VERSION = ENV['LIBFOX_VERSION'] || '1.6.57'
@@ -44,31 +44,16 @@ LIBFXSCINTILLA_SOURCE_URI = "http://download.savannah.gnu.org/releases/f
44
44
  # LIBFXSCINTILLA_VERSION = ENV['LIBFXSCINTILLA_VERSION'] || '3.5.2'
45
45
  # LIBFXSCINTILLA_SOURCE_URI = "https://github.com/yetanothergeek/fxscintilla/archive/FXSCINTILLA-#{LIBFXSCINTILLA_VERSION.gsub(".","_")}.tar.gz"
46
46
 
47
-
48
- class BuildRecipe < MiniPortile
47
+ module BuildRecipeCommons
49
48
  def initialize(name, version, files)
50
49
  super(name, version)
51
50
  self.files = files
52
51
  rootdir = File.expand_path('../../..', __FILE__)
53
52
  self.target = File.join(rootdir, "ports")
54
- # Prefer host_alias over host in order to use i586-mingw32msvc as
55
- # correct compiler prefix for cross build, but use host if not set.
56
- self.host = consolidated_host(RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"])
53
+ self.host = RbConfig::CONFIG["host"]
57
54
  self.patch_files = Dir[File.join(rootdir, "patches", self.name, self.version, "*.diff")].sort
58
55
  end
59
56
 
60
- def consolidated_host(name)
61
- name.gsub('i686-pc-mingw32', 'i586-mingw32msvc')
62
- end
63
-
64
- def configure_defaults
65
- [
66
- "--host=#{host}", # build for specific target (host)
67
- "--disable-static",
68
- "--enable-shared",
69
- ]
70
- end
71
-
72
57
  def port_path
73
58
  "#{target}/#{host}"
74
59
  end
@@ -96,6 +81,44 @@ class BuildRecipe < MiniPortile
96
81
  end
97
82
  end
98
83
 
84
+ class BuildRecipe < MiniPortile
85
+ include BuildRecipeCommons
86
+
87
+ def configure_defaults
88
+ [
89
+ "--host=#{host}", # build for specific target (host)
90
+ "--disable-static",
91
+ "--enable-shared",
92
+ ]
93
+ end
94
+ end
95
+ class BuildRecipeCMake < MiniPortileCMake
96
+ include BuildRecipeCommons
97
+
98
+ def system_processor
99
+ case host
100
+ when /x86_64/ then "amd64"
101
+ when /i686/ then "x86"
102
+ else raise "unknown host #{host}"
103
+ end
104
+ end
105
+
106
+ def configure_defaults
107
+ [
108
+ "-DENABLE_STATIC=0",
109
+ "-DENABLE_SHARED=1",
110
+ "-DCMAKE_SYSTEM_NAME=Windows",
111
+ "-DCMAKE_C_COMPILER=#{host}-gcc",
112
+ "-DCMAKE_CXX_COMPILER=#{host}-g++",
113
+ "-DCMAKE_SYSTEM_PROCESSOR=#{system_processor}",
114
+ ]
115
+ end
116
+
117
+ def make_cmd
118
+ ENV["MAKE"] || "make"
119
+ end
120
+ end
121
+
99
122
  def do_rake_compiler_setup
100
123
  if enable_config("win32-cross")
101
124
  dir_config("installed")
@@ -141,7 +164,7 @@ def do_rake_compiler_setup
141
164
  recipe.cook_and_activate
142
165
  end
143
166
 
144
- libjpeg_recipe = BuildRecipe.new("libjpeg", LIBJPEG_VERSION, [LIBJPEG_SOURCE_URI]).tap do |recipe|
167
+ libjpeg_recipe = BuildRecipeCMake.new("libjpeg", LIBJPEG_VERSION, [LIBJPEG_SOURCE_URI]).tap do |recipe|
145
168
  recipe.cook_and_activate
146
169
  end
147
170
 
@@ -309,10 +332,6 @@ end
309
332
  # Platform-specific modifications
310
333
  do_rake_compiler_setup
311
334
 
312
- $CFLAGS += " -DRUBY_1_8" if RUBY_VERSION =~ /1\.8\./
313
- $CFLAGS += " -DRUBY_1_9" if RUBY_VERSION =~ /1\.9\./
314
- $CFLAGS += " -DRUBY_2_0" if RUBY_VERSION =~ /2\.0\./
315
-
316
335
  if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc/
317
336
  $CXXFLAGS += " -Wno-unused-function"
318
337
  $CXXFLAGS += " -Wno-maybe-uninitialized"
data/ext/fox16_c/impl.cpp CHANGED
@@ -1026,7 +1026,7 @@ IMPLEMENT_FXID_STUBS(FXRbText)
1026
1026
  IMPLEMENT_FXDRAWABLE_STUBS(FXRbText)
1027
1027
  IMPLEMENT_FXWINDOW_STUBS(FXRbText)
1028
1028
  IMPLEMENT_FXSCROLLAREA_STUBS(FXRbText)
1029
- IMPLEMENT_FXTEXT_STUBS(FXRbText)
1029
+ IMPLEMENT_FXTEXT_STUBS(FXRbText,FXText)
1030
1030
 
1031
1031
  /* Start stub implementations for class FXRbTextField */
1032
1032
  IMPLEMENT_FXOBJECT_STUBS(FXRbTextField)
@@ -24,7 +24,6 @@
24
24
  * $Id: FXRbCommon.h 2303 2005-12-09 03:17:28Z lyle $
25
25
  ***********************************************************************/
26
26
 
27
- extern "C" {
28
27
  #include "ruby.h"
29
28
 
30
29
  #include "extconf.h"
@@ -32,7 +31,6 @@ extern "C" {
32
31
  #ifdef HAVE_RUBY_ENCODING_H
33
32
  #include "ruby/encoding.h"
34
33
  #endif
35
- }
36
34
 
37
35
  /**
38
36
  * The Ruby header files for Win32 redefine the symbol "select", which
@@ -27,7 +27,39 @@
27
27
  #ifndef FXRBTEXT_H
28
28
  #define FXRBTEXT_H
29
29
 
30
- #define DECLARE_FXTEXT_STUBS(klass) \
30
+ #define DECLARE_FXTEXT_STUBS(klass,subklass) \
31
+ inline void klass ## _eraseCursorOverhang(klass* self){ \
32
+ FXASSERT(self->isMemberOf(FXMETACLASS(subklass))); \
33
+ dynamic_cast<subklass*>(self)->public_eraseCursorOverhang(); \
34
+ } \
35
+ inline void klass ## _drawCursor(klass* self,FXuint state){ \
36
+ FXASSERT(self->isMemberOf(FXMETACLASS(subklass))); \
37
+ dynamic_cast<subklass*>(self)->public_drawCursor(state); \
38
+ } \
39
+ inline FXuint klass ## _style(klass* self,FXint row,FXint beg,FXint end,FXint pos){ \
40
+ FXASSERT(self->isMemberOf(FXMETACLASS(subklass))); \
41
+ return dynamic_cast<subklass*>(self)->public_style(row, beg, end, pos); \
42
+ } \
43
+ inline void klass ## _drawBufferText(klass* self,FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXint pos,FXint n,FXuint style){ \
44
+ FXASSERT(self->isMemberOf(FXMETACLASS(subklass))); \
45
+ dynamic_cast<subklass*>(self)->public_drawBufferText(dc, x, y, w, h, pos, n, style); \
46
+ } \
47
+ inline void klass ## _fillBufferRect(klass* self,FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXuint style){ \
48
+ FXASSERT(self->isMemberOf(FXMETACLASS(subklass))); \
49
+ dynamic_cast<subklass*>(self)->public_fillBufferRect(dc, x, y, w, h, style); \
50
+ } \
51
+ inline void klass ## _drawTextRow(klass* self,FXDCWindow& dc,FXint line,FXint left,FXint right){ \
52
+ FXASSERT(self->isMemberOf(FXMETACLASS(subklass))); \
53
+ dynamic_cast<subklass*>(self)->public_drawTextRow(dc, line, left, right); \
54
+ } \
55
+ inline void klass ## _drawContents(klass* self,FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){ \
56
+ FXASSERT(self->isMemberOf(FXMETACLASS(subklass))); \
57
+ dynamic_cast<subklass*>(self)->public_drawContents(dc, x, y, w, h); \
58
+ } \
59
+ inline void klass ## _drawNumbers(klass* self,FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){ \
60
+ FXASSERT(self->isMemberOf(FXMETACLASS(subklass))); \
61
+ dynamic_cast<subklass*>(self)->public_drawNumbers(dc, x, y, w, h); \
62
+ } \
31
63
  inline void klass ## _setCursorPos(klass* self,FXint pos,FXbool notify){ \
32
64
  self->klass::setCursorPos(pos,notify); \
33
65
  } \
@@ -72,7 +104,55 @@ inline void klass ## _setStyledText(klass* self,const FXString& text,FXint style
72
104
  }
73
105
 
74
106
 
75
- #define IMPLEMENT_FXTEXT_STUBS(cls) \
107
+ #define IMPLEMENT_FXTEXT_STUBS(cls,superklass) \
108
+ void cls::eraseCursorOverhang(){ \
109
+ FXRbCallVoidMethod(this,"eraseCursorOverhang"); \
110
+ } \
111
+ void cls::public_eraseCursorOverhang(){ \
112
+ superklass::eraseCursorOverhang(); \
113
+ } \
114
+ void cls::drawCursor(FXuint state){ \
115
+ FXRbCallVoidMethod(this,"drawCursor", state); \
116
+ } \
117
+ void cls::public_drawCursor(FXuint state){ \
118
+ superklass::drawCursor(state); \
119
+ } \
120
+ FXuint cls::style(FXint row,FXint beg,FXint end,FXint pos){ \
121
+ return FXRbCallUIntMethod(this,"style", row, beg, end, pos); \
122
+ } \
123
+ FXuint cls::public_style(FXint row,FXint beg,FXint end,FXint pos){ \
124
+ return superklass::style(row, beg, end, pos); \
125
+ } \
126
+ void cls::drawBufferText(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXint pos,FXint n,FXuint style){ \
127
+ FXRbCallVoidMethod(this,"drawBufferText", dc, x, y, w, h, pos, n, style); \
128
+ } \
129
+ void cls::public_drawBufferText(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXint pos,FXint n,FXuint style){ \
130
+ superklass::drawBufferText(dc, x, y, w, h, pos, n, style); \
131
+ } \
132
+ void cls::fillBufferRect(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXuint style){ \
133
+ FXRbCallVoidMethod(this,"fillBufferRect", dc, x, y, w, h, style); \
134
+ } \
135
+ void cls::public_fillBufferRect(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXuint style){ \
136
+ superklass::fillBufferRect(dc, x, y, w, h, style); \
137
+ } \
138
+ void cls::drawTextRow(FXDCWindow& dc,FXint line,FXint left,FXint right){ \
139
+ FXRbCallVoidMethod(this,"drawTextRow", dc, line, left, right); \
140
+ } \
141
+ void cls::public_drawTextRow(FXDCWindow& dc,FXint line,FXint left,FXint right){ \
142
+ superklass::drawTextRow(dc, line, left, right); \
143
+ } \
144
+ void cls::drawContents(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){ \
145
+ FXRbCallVoidMethod(this,"drawContents", dc, x, y, w, h); \
146
+ } \
147
+ void cls::public_drawContents(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){ \
148
+ superklass::drawContents(dc, x, y, w, h); \
149
+ } \
150
+ void cls::drawNumbers(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){ \
151
+ FXRbCallVoidMethod(this,"drawNumbers", dc, x, y, w, h); \
152
+ } \
153
+ void cls::public_drawNumbers(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){ \
154
+ superklass::drawNumbers(dc, x, y, w, h); \
155
+ } \
76
156
  void cls::setCursorPos(FXint pos,FXbool notify){ \
77
157
  FXRbCallVoidMethod(this,"setCursorPos",pos,notify); \
78
158
  } \
@@ -1,3 +1,25 @@
1
+ protected:
2
+ // Overrides the base class versions of these virtual functions
3
+ virtual void eraseCursorOverhang();
4
+ virtual void drawCursor(FXuint state);
5
+ virtual FXuint style(FXint row,FXint beg,FXint end,FXint pos);
6
+ virtual void drawBufferText(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXint pos,FXint n,FXuint style);
7
+ virtual void fillBufferRect(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXuint style);
8
+ virtual void drawTextRow(FXDCWindow& dc,FXint line,FXint left,FXint right);
9
+ virtual void drawContents(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
10
+ virtual void drawNumbers(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
11
+
12
+ public:
13
+ // Publically accessible versions of those protected functions
14
+ void public_eraseCursorOverhang();
15
+ void public_drawCursor(FXuint state);
16
+ FXuint public_style(FXint row,FXint beg,FXint end,FXint pos);
17
+ void public_drawBufferText(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXint pos,FXint n,FXuint style);
18
+ void public_fillBufferRect(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h,FXuint style);
19
+ void public_drawTextRow(FXDCWindow& dc,FXint line,FXint left,FXint right);
20
+ void public_drawContents(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
21
+ void public_drawNumbers(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h);
22
+
1
23
  public:
2
24
  // Overrides the base class version of setCursorPos()
3
25
  virtual void setCursorPos(FXint pos,FXbool notify=FALSE);
@@ -359,6 +359,9 @@ inline VALUE to_ruby_cb(const FXFontDesc& fontdesc){
359
359
  inline VALUE to_ruby_cb(FXDC& dc){
360
360
  return FXRbGetRubyObjCb(reinterpret_cast<void*>(&dc), FXRbTypeQuery("FXDC *"));
361
361
  }
362
+ inline VALUE to_ruby_cb(FXDCWindow& dc){
363
+ return FXRbGetRubyObjCb(reinterpret_cast<void*>(&dc), FXRbTypeQuery("FXDCWindow *"));
364
+ }
362
365
 
363
366
  template<class TYPE>
364
367
  VALUE to_ruby_cb(TYPE obj){
@@ -466,7 +469,7 @@ void FXRbCallVoidMethod_gvlcb(FXDC* recv,const char *func,TYPE1 arg1,TYPE2 arg2,
466
469
 
467
470
  /* Four arguments */
468
471
  template<class TYPE1, class TYPE2, class TYPE3, class TYPE4>
469
- void FXRbCallVoidMethod_gvlcb(FXObject* recv,const char *func, TYPE1 arg1, TYPE2 arg2, TYPE3 arg3, TYPE4 arg4){
472
+ void FXRbCallVoidMethod_gvlcb(FXObject* recv,const char *func, TYPE1& arg1, TYPE2 arg2, TYPE3 arg3, TYPE4 arg4){
470
473
  VALUE obj=FXRbGetRubyObj(recv,false);
471
474
  FXASSERT(!NIL_P(obj));
472
475
  rb_funcall(obj,rb_intern(func),4,to_ruby_cb(arg1),to_ruby_cb(arg2),to_ruby_cb(arg3),to_ruby_cb(arg4));
@@ -496,7 +499,7 @@ void FXRbCallVoidMethod_gvlcb(FXDC* recv, const char *func, TYPE1 arg1, TYPE2 ar
496
499
 
497
500
  /* Six arguments */
498
501
  template<class TYPE1, class TYPE2, class TYPE3, class TYPE4, class TYPE5, class TYPE6>
499
- void FXRbCallVoidMethod_gvlcb(const FXObject* recv, const char *func, TYPE1 arg1, TYPE2& arg2, TYPE3 arg3, TYPE4 arg4, TYPE5 arg5, TYPE6 arg6){
502
+ void FXRbCallVoidMethod_gvlcb(const FXObject* recv, const char *func, TYPE1& arg1, TYPE2& arg2, TYPE3 arg3, TYPE4 arg4, TYPE5 arg5, TYPE6 arg6){
500
503
  VALUE obj=FXRbGetRubyObj(recv,false);
501
504
  FXASSERT(!NIL_P(obj));
502
505
  rb_funcall(obj,rb_intern(func),6,to_ruby_cb(arg1),to_ruby_cb(arg2),to_ruby_cb(arg3),to_ruby_cb(arg4),to_ruby_cb(arg5),to_ruby_cb(arg6));
@@ -517,6 +520,13 @@ void FXRbCallVoidMethod_gvlcb(FXDC* recv, const char *func, TYPE1 arg1, TYPE2 ar
517
520
  rb_funcall(obj,rb_intern(func),7,to_ruby_cb(arg1),to_ruby_cb(arg2),to_ruby_cb(arg3),to_ruby_cb(arg4),to_ruby_cb(arg5),to_ruby_cb(arg6),to_ruby_cb(arg7));
518
521
  }
519
522
 
523
+ template<class TYPE1, class TYPE2, class TYPE3, class TYPE4, class TYPE5, class TYPE6, class TYPE7, class TYPE8>
524
+ void FXRbCallVoidMethod_gvlcb(FXObject* recv, const char *func, TYPE1& arg1, TYPE2 arg2, TYPE3 arg3, TYPE4 arg4, TYPE5 arg5, TYPE6 arg6, TYPE7 arg7, TYPE8 arg8){
525
+ VALUE obj=FXRbGetRubyObj(recv,false);
526
+ FXASSERT(!NIL_P(obj));
527
+ rb_funcall(obj,rb_intern(func),8,to_ruby_cb(arg1),to_ruby_cb(arg2),to_ruby_cb(arg3),to_ruby_cb(arg4),to_ruby_cb(arg5),to_ruby_cb(arg6),to_ruby_cb(arg7), to_ruby_cb(arg8));
528
+ }
529
+
520
530
  /* Nine arguments */
521
531
  template<class TYPE1, class TYPE2, class TYPE3, class TYPE4, class TYPE5, class TYPE6, class TYPE7, class TYPE8, class TYPE9>
522
532
  void FXRbCallVoidMethod_gvlcb(FXDC* recv, const char *func, TYPE1 arg1, TYPE2 arg2, TYPE3 arg3, TYPE4 arg4, TYPE5 arg5, TYPE6 arg6, TYPE7 arg7, TYPE8 arg8, TYPE9 arg9){
@@ -644,6 +654,14 @@ FXuint FXRbCallUIntMethod_gvlcb(FXObject* recv, const char *func, TYPE arg){
644
654
  return static_cast<FXuint>(NUM2UINT(v));
645
655
  }
646
656
 
657
+ template<class TYPE1, class TYPE2, class TYPE3, class TYPE4>
658
+ FXuint FXRbCallUIntMethod_gvlcb(FXObject* recv, const char *func, TYPE1 arg1, TYPE2 arg2, TYPE3 arg3, TYPE4 arg4){
659
+ VALUE obj=FXRbGetRubyObj(recv,false);
660
+ FXASSERT(!NIL_P(obj));
661
+ VALUE v=rb_funcall(obj,rb_intern(func),4,to_ruby_cb(arg1),to_ruby_cb(arg2),to_ruby_cb(arg3),to_ruby_cb(arg4));
662
+ return static_cast<FXuint>(NUM2UINT(v));
663
+ }
664
+
647
665
  // Call functions with FXString return value
648
666
  FXString FXRbCallStringMethod_gvlcb(const FXObject* recv, const char *func);
649
667
 
@@ -15,16 +15,14 @@
15
15
  #ifndef __gvl_wrappers_h
16
16
  #define __gvl_wrappers_h
17
17
 
18
- extern "C" {
19
- #if defined(HAVE_RB_THREAD_CALL_WITH_GVL)
20
- extern void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
21
- #endif
18
+ #if defined(HAVE_RB_THREAD_CALL_WITH_GVL)
19
+ extern "C" void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
20
+ #endif
22
21
 
23
- #if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
24
- extern "C" void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1,
25
- rb_unblock_function_t *ubf, void *data2);
26
- #endif
27
- }
22
+ #if defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
23
+ extern "C" void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1,
24
+ rb_unblock_function_t *ubf, void *data2);
25
+ #endif
28
26
 
29
27
  void fxrb_wakeup_fox(void *);
30
28
 
@@ -287,7 +285,7 @@ FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_STUB_DECL )
287
285
 
288
286
  #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_6(param) \
289
287
  param(ID, , func) \
290
- param(TYPE1, , arg1) \
288
+ param(TYPE1, &, arg1) \
291
289
  param(TYPE2, , arg2) \
292
290
  param(TYPE3, , arg3) \
293
291
  param(TYPE4, , arg4)
@@ -302,7 +300,7 @@ FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_STUB_DECL )
302
300
 
303
301
  #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_8(param) \
304
302
  param(ID, , func) \
305
- param(TYPE1, , arg1) \
303
+ param(TYPE1, &, arg1) \
306
304
  param(TYPE2, &, arg2) \
307
305
  param(TYPE3, , arg3) \
308
306
  param(TYPE4, , arg4) \
@@ -319,6 +317,17 @@ FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_STUB_DECL )
319
317
  param(TYPE6, , arg6) \
320
318
  param(TYPE7, , arg7)
321
319
 
320
+ #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_10(param) \
321
+ param(ID, , func) \
322
+ param(TYPE1, &, arg1) \
323
+ param(TYPE2, , arg2) \
324
+ param(TYPE3, , arg3) \
325
+ param(TYPE4, , arg4) \
326
+ param(TYPE5, , arg5) \
327
+ param(TYPE6, , arg6) \
328
+ param(TYPE7, , arg7) \
329
+ param(TYPE8, , arg8)
330
+
322
331
  #define FOR_EACH_PARAM_OF_FXRbCallVoidMethod_11(param) \
323
332
  param(ID, , func) \
324
333
  param(TYPE1, , arg1) \
@@ -387,6 +396,13 @@ FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_STUB_DECL )
387
396
  param(ID, , func) \
388
397
  param(TYPE1, , arg1)
389
398
 
399
+ #define FOR_EACH_PARAM_OF_FXRbCallUIntMethod_6(param) \
400
+ param(ID, , func) \
401
+ param(TYPE1, , arg1) \
402
+ param(TYPE2, , arg2) \
403
+ param(TYPE3, , arg3) \
404
+ param(TYPE4, , arg4)
405
+
390
406
  #define FOR_EACH_PARAM_OF_FXRbCallGLObjectMethod_2(param) \
391
407
  param(ID, , func)
392
408
 
@@ -544,6 +560,7 @@ FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_STUB_DECL )
544
560
  function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 7) \
545
561
  function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 8) \
546
562
  function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 9) \
563
+ function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 10) \
547
564
  function(FXRbCallVoidMethod, GVL_TYPE_VOID, void, RECV, recv, 11) \
548
565
  function(FXRbCallBoolMethod, GVL_TYPE_NONVOID, bool, RECV, recv, 2) \
549
566
  function(FXRbCallBoolMethod, GVL_TYPE_NONVOID, bool, RECV, recv, 3) \
@@ -556,6 +573,7 @@ FOR_EACH_BLOCKING_FUNCTION( DEFINE_GVL_STUB_DECL )
556
573
  function(FXRbCallIntMethod, GVL_TYPE_NONVOID, FXint, RECV, recv, 7) \
557
574
  function(FXRbCallLongMethod, GVL_TYPE_NONVOID, FXint, RECV, recv, 5) \
558
575
  function(FXRbCallUIntMethod, GVL_TYPE_NONVOID, FXint, RECV, recv, 3) \
576
+ function(FXRbCallUIntMethod, GVL_TYPE_NONVOID, FXint, RECV, recv, 6) \
559
577
  function(FXRbCallGLObjectMethod, GVL_TYPE_NONVOID, FXGLObject*, RECV, recv, 2) \
560
578
  function(FXRbCallGLObjectMethod, GVL_TYPE_NONVOID, FXGLObject*, RECV, recv, 3) \
561
579
  function(FXRbCallGLObjectMethod, GVL_TYPE_NONVOID, FXGLObject*, RECV, recv, 4) \
@@ -1,6 +1,6 @@
1
1
  #!/bin/env ruby
2
2
 
3
- $special_stubclasses = ["FXGLSHAPE", "FXICONITEM", "FXTABLE", "FXTABLEITEM", "FXTREEITEM"]
3
+ $special_stubclasses = ["FXGLSHAPE", "FXICONITEM", "FXTABLE", "FXTABLEITEM", "FXTEXT", "FXTREEITEM"]
4
4
 
5
5
  class Processor
6
6
  def initialize
data/fxruby.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.email = ["lyle@lylejohnson.name", "lars@greiz-reinsdorf.de"]
32
32
 
33
33
  spec.summary = %q{FXRuby is the Ruby binding to the FOX GUI toolkit.}
34
- spec.homepage = "http://fxruby.org/"
34
+ spec.homepage = "https://github.com/larskanis/fxruby"
35
35
  spec.license = 'LGPL-2.1'
36
36
 
37
37
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
data/lib/fox16/input.rb CHANGED
@@ -5,10 +5,13 @@ module Fox
5
5
  alias addInputOrig addInput # :nodoc:
6
6
 
7
7
  #
8
- # Add a file descriptor _fileDesc_ to be watched for activity as determined
9
- # by _mode_, where _mode_ is a bitwise OR (+INPUT_READ+, +INPUT_WRITE+, +INPUT_EXCEPT+).
10
- # A message of type +SEL_IO_READ+, +SEL_IO_WRITE+, or +SEL_IO_EXCEPT+ will be sent
11
- # to the target when the specified activity is detected on the file descriptor.
8
+ # Add an IO object as _io_ to be watched for activity as determined by _mode_, where _mode_ is a bitwise OR (+INPUT_READ+, +INPUT_WRITE+, +INPUT_EXCEPT+).
9
+ # A message of type +SEL_IO_READ+, +SEL_IO_WRITE+, or +SEL_IO_EXCEPT+ will be sent to the target when the specified activity is detected on the file descriptor.
10
+ #
11
+ # On POSIX operating systems all kinds of file descriptors can be watched.
12
+ # It works for +Socket.new+, +IO.popen+, +IO.pipe+, +IO.for_fd+, +File.open+, etc.
13
+ # Windows provides level triggered events only for network sockets.
14
+ # So on Windows only socket IO objects like +TCPSocket.new+ and +TCPServer.new+ are currently supported to be watched.
12
15
  #
13
16
  # There are several forms for #addInput; the original form (from FOX)
14
17
  # takes four arguments:
@@ -30,8 +33,7 @@ module Fox
30
33
  # ... handle the I/O event ...
31
34
  # }
32
35
  #
33
-
34
- def addInput(fd, mode, *args, &block)
36
+ def addInput(io, mode, *args, &block)
35
37
  params = {}
36
38
  params = args.pop if args.last.is_a? Hash
37
39
  tgt, sel = nil, 0
@@ -51,7 +53,7 @@ module Fox
51
53
  tgt.pconnect(SEL_IO_WRITE, block, params)
52
54
  tgt.pconnect(SEL_IO_EXCEPT, block, params)
53
55
  end
54
- addInputOrig(fd, mode, tgt, sel)
56
+ addInputOrig(io, mode, tgt, sel)
55
57
  end
56
58
 
57
59
  end # class FXApp