Object 2.95 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/* Copyright 1997 Acorn Computers Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/***************************************************/
/* File   : Object.h                               */
/*                                                 */
/* Purpose: Handling OBJECT, APPLET and EMBED.     */
/*                                                 */
/* Author : A.D.Hodgkinson                         */
/*                                                 */
/* History: 05-Oct-97: Created.                    */
/***************************************************/

25 26
/* Structures */

27 28 29 30
/* The object_info structure is used to hold information */
/* about each object (or applet or embed) tag that a     */
/* browser is dealing with.                              */

31
typedef struct object_info
32
{
33 34
  unsigned int   plugin_instance_handle; /* Only if isplugin (below) set */
  unsigned int   plugin_task_handle;     /* Only if isplugin (below) set */
35 36

  HStream      * token;
37

38 39 40
  int            x;
  int            y;

41 42 43
  int            w;
  int            h;

44 45 46
  unsigned       isimage       :1;
  unsigned       isplugin      :1;
  unsigned       broadcast_sent:1;
47
}
48 49 50 51
object_info;

/* Function prototypes */

52 53
_kernel_oserror * object_new_object                (browser_data * b, HStream * t);
_kernel_oserror * object_discard                   (browser_data * b);
54

55
_kernel_oserror * object_get_token_object_size     (browser_data * b, HStream * t, BBox * size);
56
_kernel_oserror * object_set_token_object_size     (browser_data * b, HStream * t, BBox * size);
57 58
int               object_get_token_object_position (browser_data * b, HStream * t, int * x, int * y);
int               object_set_token_object_position (browser_data * b, HStream * t, int x, int y);
59
int               object_get_token_object_box      (browser_data * b, HStream * t, BBox * box);
60

61
_kernel_oserror * object_get_token_object_plugin   (browser_data * b, HStream * t, unsigned int * plugin_instance, unsigned int * plugin_task);
62
_kernel_oserror * object_set_token_object_plugin   (browser_data * b, HStream * t, unsigned int plugin_instance, unsigned int plugin_task);
63
int               object_return_info               (browser_data * b, unsigned int plugin_instance_handle, HStream ** token, unsigned int * plugin_task);
64

65
_kernel_oserror * object_redraw                    (browser_data * b, WimpRedrawWindowBlock * r, HStream * token, int x, int y);
66 67

int               object_token_is_image            (browser_data * b, HStream * t);