gecko-dev/gfx2/public/nsICursor.idl

117 строки
3.4 KiB
Plaintext

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Stuart Parmenter <pavlov@netscape.com>
*/
#include "nsISupports.idl"
interface nsIImage;
/**
* nsICursor interface
*
* @author Stuart Parmenter <pavlov@netscape.com>
* @version 0.0
* @see nsIWindow
*/
[scriptable, uuid(6e375fe6-1dd2-11b2-bc72-a50ca62dc040)]
interface nsICursor : nsISupports
{
/**
* @attention renumber this in order
* CSS cursors
* @name cursors
* @see http://www.w3.org/TR/REC-CSS2/ui.html#cursor-props
* @see http://www.w3.org/TR/css3-userint#cursor
*/
//@{
/// cursor has come from an image
const long image = -1;
/// normal cursor, usually rendered as an arrow
const long standard = 0;
/// system is busy, usually rendered as a hourglass or watch
const long wait = 1;
/// Selecting something, usually rendered as an IBeam
const long select = 2;
/// can hyper-link, usually rendered as a human hand
const long hyperlink = 3;
/// west/east sizing, usually rendered as ->||<-
const long sizeWE = 4;
/// north/south sizing, usually rendered as sizeWE rotated 90 degrees
const long sizeNS = 5;
///(corner sizing)
const long sizeNW = 50;
const long sizeSE = 51;
const long sizeNE = 52;
const long sizeSW = 53;
const long arrow_north = 6;
const long arrow_north_plus = 7;
const long arrow_south = 8;
const long arrow_south_plus = 9;
const long arrow_west = 10;
const long arrow_west_plus = 11;
const long arrow_east = 12;
const long arrow_east_plus = 13;
const long crosshair = 14;
/// Don't know what 'move' cursor should be. See CSS2.
const long move = 15;
const long help = 16;
const long copy = 17;
const long alias = 18;
const long context_menu = 19;
const long cell = 20;
const long grab = 21;
const long grabbing = 22;
const long spinning = 23;
const long count_up = 24;
const long count_down = 25;
const long count_up_down = 26;
//@}
/**
* Create a cursor based on the constant passed in.
*
* @param cursor the constant for the cursor you wish to create.
*/
attribute long cursor;
/**
* Create a cursor based on an image.
*
* @param image The image you wish to create the cursor with.
*
* @attention this might have issues on X, etc
*/
void setToImage(in nsIImage image);
};