front_idill/extern/fajran-npTuioClient/src/npplat.h
author bastiena
Fri, 06 Apr 2012 10:44:54 +0200
changeset 21 e4e5f02787a1
permissions -rw-r--r--
Front IDILL : Added Communication extern named fajran-npTuioClient It contains the project generating a dll used as a browser plugin.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     2
/* ***** BEGIN LICENSE BLOCK *****
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     4
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     5
 * The contents of this file are subject to the Mozilla Public License Version
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     6
 * 1.1 (the "License"); you may not use this file except in compliance with
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     7
 * the License. You may obtain a copy of the License at
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     8
 * http://www.mozilla.org/MPL/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     9
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    10
 * Software distributed under the License is distributed on an "AS IS" basis,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    12
 * for the specific language governing rights and limitations under the
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    13
 * License.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    14
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    15
 * The Original Code is mozilla.org code.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    16
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    17
 * The Initial Developer of the Original Code is
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    18
 * Netscape Communications Corporation.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    19
 * Portions created by the Initial Developer are Copyright (C) 1998
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    20
 * the Initial Developer. All Rights Reserved.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    21
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    22
 * Contributor(s):
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    23
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    24
 * Alternatively, the contents of this file may be used under the terms of
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    25
 * either the GNU General Public License Version 2 or later (the "GPL"), or
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    26
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    27
 * in which case the provisions of the GPL or the LGPL are applicable instead
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    28
 * of those above. If you wish to allow use of your version of this file only
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    29
 * under the terms of either the GPL or the LGPL, and not to allow others to
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    30
 * use your version of this file under the terms of the MPL, indicate your
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    31
 * decision by deleting the provisions above and replace them with the notice
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    32
 * and other provisions required by the GPL or the LGPL. If you do not delete
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    33
 * the provisions above, a recipient may use your version of this file under
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    34
 * the terms of any one of the MPL, the GPL or the LGPL.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    35
 *
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    36
 * ***** END LICENSE BLOCK ***** */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    37
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    38
#ifndef _NPPLAT_H_
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    39
#define _NPPLAT_H_
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    40
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    41
#include "npapi.h"
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    42
#include "npupp.h"
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    43
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    44
/**************************************************/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    45
/*                                                */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    46
/*                   Windows                      */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    47
/*                                                */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    48
/**************************************************/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    49
#ifdef XP_WIN
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    50
#include "windows.h"
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    51
#endif //XP_WIN
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    52
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    53
/**************************************************/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    54
/*                                                */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    55
/*                    Unix                        */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    56
/*                                                */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    57
/**************************************************/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    58
#ifdef XP_UNIX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    59
#include <stdio.h>
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    60
#endif //XP_UNIX
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    61
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    62
/**************************************************/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    63
/*                                                */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    64
/*                     Mac                        */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    65
/*                                                */
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    66
/**************************************************/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    67
#ifdef XP_MAC
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    68
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    69
// Wrapper functions for all calls from Netscape to the plugin.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    70
// These functions let the plugin developer just create the APIs
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    71
// as documented and defined in npapi.h, without needing to 
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    72
// install those functions in the function table or worry about
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    73
// setting up globals for 68K plugins.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    74
NPError Private_Initialize(void);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    75
void    Private_Shutdown(void);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    76
NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    77
NPError Private_Destroy(NPP instance, NPSavedData** save);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    78
NPError Private_SetWindow(NPP instance, NPWindow* window);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    79
NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    80
NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    81
int32   Private_WriteReady(NPP instance, NPStream* stream);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    82
int32   Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    83
void    Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    84
void    Private_Print(NPP instance, NPPrint* platformPrint);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    85
int16   Private_HandleEvent(NPP instance, void* event);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    86
void    Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    87
jref    Private_GetJavaClass(void);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    88
NPError Private_GetValue(NPP instance, NPPVariable variable, void *result);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    89
NPError Private_SetValue(NPP instance, NPNVariable variable, void *value);
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    90
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    91
#endif //XP_MAC
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    92
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    93
#ifndef HIBYTE
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    94
#define HIBYTE(i) (i >> 8)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    95
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    96
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    97
#ifndef LOBYTE
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    98
#define LOBYTE(i) (i & 0xff)
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    99
#endif
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   100
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
   101
#endif //_NPPLAT_H_