rubyosa19 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/rubyosa/extconf.rb +55 -0
- data/ext/rubyosa/osx_intern.h +912 -0
- data/ext/rubyosa/osx_ruby.h +34 -0
- data/ext/rubyosa/rbosa.c +717 -0
- data/ext/rubyosa/rbosa.h +55 -0
- data/ext/rubyosa/rbosa_conv.c +97 -0
- data/ext/rubyosa/rbosa_err.c +105 -0
- data/ext/rubyosa/rbosa_sdef.c +441 -0
- data/lib/rubyosa.rb +18 -0
- data/lib/rubyosa/rbosa.rb +1040 -0
- data/lib/rubyosa/rbosa_properties.rb +141 -0
- metadata +63 -0
@@ -0,0 +1,141 @@
|
|
1
|
+
# Copyright (c) 2006-2007, Apple Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Redistribution and use in source and binary forms, with or without
|
4
|
+
# modification, are permitted provided that the following conditions
|
5
|
+
# are met:
|
6
|
+
# 1. Redistributions of source code must retain the above copyright
|
7
|
+
# notice, this list of conditions and the following disclaimer.
|
8
|
+
# 2. Redistributions in binary form must reproduce the above copyright
|
9
|
+
# notice, this list of conditions and the following disclaimer in the
|
10
|
+
# documentation and/or other materials provided with the distribution.
|
11
|
+
# 3. Neither the name of Apple Inc. ("Apple") nor the names of
|
12
|
+
# its contributors may be used to endorse or promote products derived
|
13
|
+
# from this software without specific prior written permission.
|
14
|
+
#
|
15
|
+
# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND
|
16
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
17
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
18
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR
|
19
|
+
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
20
|
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
21
|
+
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
22
|
+
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
23
|
+
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
+
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
25
|
+
# POSSIBILITY OF SUCH DAMAGE.
|
26
|
+
|
27
|
+
require 'enumerator'
|
28
|
+
|
29
|
+
module OSA
|
30
|
+
@sym_to_code = {}
|
31
|
+
@code_to_sym = {}
|
32
|
+
|
33
|
+
def self.add_property(sym, code, override=false)
|
34
|
+
unless override
|
35
|
+
return if @sym_to_code.has_key?(sym) or @code_to_sym.has_key?(code)
|
36
|
+
end
|
37
|
+
@sym_to_code[sym] = code
|
38
|
+
@code_to_sym[code] = sym
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.sym_to_code(sym)
|
42
|
+
@sym_to_code[sym]
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.code_to_sym(code)
|
46
|
+
@code_to_sym[code]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
[
|
51
|
+
# pArcAngle
|
52
|
+
:arc_angle, 'parc',
|
53
|
+
:background_color, 'pbcl',
|
54
|
+
:background_pattern, 'pbpt',
|
55
|
+
:best_type, 'pbst',
|
56
|
+
:bounds, 'pbnd',
|
57
|
+
:class, 'pcls',
|
58
|
+
:clipboard, 'pcli',
|
59
|
+
:color, 'colr',
|
60
|
+
:color_table, 'cltb',
|
61
|
+
:contents, 'pcnt',
|
62
|
+
:corner_curve_height, 'pchd',
|
63
|
+
:corner_curve_width, 'pcwd',
|
64
|
+
:dash_style, 'pdst',
|
65
|
+
:default_type, 'deft',
|
66
|
+
:definition_rect, 'pdrt',
|
67
|
+
:enabled, 'enbl',
|
68
|
+
:end_point, 'pend',
|
69
|
+
:fill_color, 'flcl',
|
70
|
+
:fill_pattern, 'flpt',
|
71
|
+
:font, 'font',
|
72
|
+
|
73
|
+
# pFormula
|
74
|
+
:formula, 'pfor',
|
75
|
+
:graphic_objects, 'gobs',
|
76
|
+
:has_close_box, 'hclb',
|
77
|
+
:has_title_bar, 'ptit',
|
78
|
+
:id, 'ID ',
|
79
|
+
:index, 'pidx',
|
80
|
+
:insertion_loc, 'pins',
|
81
|
+
:is_floating, 'isfl',
|
82
|
+
:is_front_process, 'pisf',
|
83
|
+
:is_modal, 'pmod',
|
84
|
+
:is_modified, 'imod',
|
85
|
+
:is_resizable, 'prsz',
|
86
|
+
:is_stationery_pad, 'pspd',
|
87
|
+
:is_zoomable, 'iszm',
|
88
|
+
:is_zoomed, 'pzum',
|
89
|
+
:item_number, 'itmn',
|
90
|
+
:justification, 'pjst',
|
91
|
+
:line_arrow, 'arro',
|
92
|
+
:menu_id, 'mnid',
|
93
|
+
:name, 'pnam',
|
94
|
+
|
95
|
+
# pNewElementLoc
|
96
|
+
:new_element_loc, 'pnel',
|
97
|
+
:pen_color, 'ppcl',
|
98
|
+
:pen_pattern, 'pppa',
|
99
|
+
:pen_width, 'ppwd',
|
100
|
+
:pixel_depth, 'pdpt',
|
101
|
+
:point_list, 'ptlt',
|
102
|
+
:point_size, 'ptsz',
|
103
|
+
:protection, 'ppro',
|
104
|
+
:rotation, 'prot',
|
105
|
+
:scale, 'pscl',
|
106
|
+
:script, 'scpt',
|
107
|
+
:script_tag, 'psct',
|
108
|
+
:selected, 'selc',
|
109
|
+
:selection, 'sele',
|
110
|
+
:start_angle, 'pang',
|
111
|
+
:start_point, 'pstp',
|
112
|
+
:text_color, 'ptxc',
|
113
|
+
:text_font, 'ptxf',
|
114
|
+
:text_item_delimiters, 'txdl',
|
115
|
+
:text_point_size, 'ptps',
|
116
|
+
|
117
|
+
# pScheme
|
118
|
+
:scheme, 'pusc',
|
119
|
+
:host, 'HOST',
|
120
|
+
:path, 'FTPc',
|
121
|
+
:user_name, 'RAun',
|
122
|
+
:user_password, 'RApw',
|
123
|
+
:dns_form, 'pDNS',
|
124
|
+
:url, 'pURL',
|
125
|
+
:text_encoding, 'ptxe',
|
126
|
+
:ftp_kind, 'kind',
|
127
|
+
|
128
|
+
# pTextStyles
|
129
|
+
:text_styles, 'txst',
|
130
|
+
:transfer_mode, 'pptm',
|
131
|
+
:translation, 'ptrs',
|
132
|
+
:uniform_styles, 'ustl',
|
133
|
+
:update_on, 'pupd',
|
134
|
+
:user_selection, 'pusl',
|
135
|
+
:version, 'vers',
|
136
|
+
:visible, 'pvis'
|
137
|
+
|
138
|
+
].each_slice(2) { |sym, code| OSA.add_property(sym, code) }
|
139
|
+
|
140
|
+
# A convenience shortcut to :point_size
|
141
|
+
OSA.add_property(:size, 'ptsz', true)
|
metadata
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubyosa19
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Alain Hoang
|
9
|
+
- Jan Dvorak
|
10
|
+
- Minh Thu Vo
|
11
|
+
- James Adam
|
12
|
+
- Paolo Bosetti
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
date: 2012-04-18 00:00:00.000000000 Z
|
17
|
+
dependencies: []
|
18
|
+
description: This is a modernization of the glorious but unmaintained rubyosa version,
|
19
|
+
aimed at making it compatible with ruby 1.9.x series. At the moment, it successfully
|
20
|
+
compiles on OS X Lion.
|
21
|
+
email: p4010@me.com
|
22
|
+
executables: []
|
23
|
+
extensions:
|
24
|
+
- ext/rubyosa/extconf.rb
|
25
|
+
extra_rdoc_files: []
|
26
|
+
files:
|
27
|
+
- lib/rubyosa/rbosa.rb
|
28
|
+
- lib/rubyosa/rbosa_properties.rb
|
29
|
+
- lib/rubyosa.rb
|
30
|
+
- ext/rubyosa/rbosa.c
|
31
|
+
- ext/rubyosa/rbosa_conv.c
|
32
|
+
- ext/rubyosa/rbosa_err.c
|
33
|
+
- ext/rubyosa/rbosa_sdef.c
|
34
|
+
- ext/rubyosa/osx_intern.h
|
35
|
+
- ext/rubyosa/osx_ruby.h
|
36
|
+
- ext/rubyosa/rbosa.h
|
37
|
+
- ext/rubyosa/extconf.rb
|
38
|
+
homepage: http://github.com/pbosetti/rubyosa19
|
39
|
+
licenses: []
|
40
|
+
post_install_message:
|
41
|
+
rdoc_options: []
|
42
|
+
require_paths:
|
43
|
+
- lib
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
none: false
|
46
|
+
requirements:
|
47
|
+
- - ! '>='
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
requirements: []
|
57
|
+
rubyforge_project: rubyosa19
|
58
|
+
rubygems_version: 1.8.21
|
59
|
+
signing_key:
|
60
|
+
specification_version: 3
|
61
|
+
summary: Ruby 1.9.x OSA script interface
|
62
|
+
test_files: []
|
63
|
+
has_rdoc: false
|