Source Code Cross Referenced for GDI32.java in  » IDE-Netbeans » core » org » netbeans » core » nativeaccess » transparency » win32 » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » core » org.netbeans.core.nativeaccess.transparency.win32 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright (c) 2007 Timothy Wall, All Rights Reserved
002:         *
003:         * This library is free software; you can redistribute it and/or
004:         * modify it under the terms of the GNU Lesser General Public
005:         * License as published by the Free Software Foundation; either
006:         * version 2.1 of the License, or (at your option) any later version.
007:         * <p/>
008:         * This library is distributed in the hope that it will be useful,
009:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
010:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
011:         * Lesser General Public License for more details.  
012:         */
013:        package org.netbeans.core.nativeaccess.transparency.win32;
014:
015:        import java.awt.Rectangle;
016:
017:        import com.sun.jna.Native;
018:        import com.sun.jna.Pointer;
019:        import com.sun.jna.Structure;
020:        import com.sun.jna.ptr.PointerByReference;
021:
022:        /** Definition (incomplete) of <code>gdi32.dll</code>. */
023:        public interface GDI32 extends W32API {
024:
025:            GDI32 INSTANCE = (GDI32) Native.loadLibrary("gdi32", GDI32.class,
026:                    DEFAULT_OPTIONS);
027:
028:            public static class RECT extends Structure {
029:                public int left;
030:                public int top;
031:                public int right;
032:                public int bottom;
033:
034:                public Rectangle toRectangle() {
035:                    return new Rectangle(left, top, right - left, bottom - top);
036:                }
037:
038:                public String toString() {
039:                    return "[(" + left + "," + top + ")(" + right + ","
040:                            + bottom + ")]";
041:                }
042:            }
043:
044:            int RDH_RECTANGLES = 1;
045:
046:            public static class RGNDATAHEADER extends Structure {
047:                public int dwSize = size();
048:                public int iType = RDH_RECTANGLES; // required
049:                public int nCount;
050:                public int nRgnSize;
051:                public RECT rcBound;
052:            }
053:
054:            public static class RGNDATA extends Structure {
055:                public RGNDATAHEADER rdh;
056:                public byte[] Buffer;
057:
058:                public RGNDATA(int bufferSize) {
059:                    Buffer = new byte[bufferSize];
060:                    allocateMemory();
061:                }
062:            }
063:
064:            public HRGN ExtCreateRegion(Pointer lpXform, int nCount,
065:                    RGNDATA lpRgnData);
066:
067:            int RGN_AND = 1;
068:            int RGN_OR = 2;
069:            int RGN_XOR = 3;
070:            int RGN_DIFF = 4;
071:            int RGN_COPY = 5;
072:
073:            int ERROR = 0;
074:            int NULLREGION = 1;
075:            int SIMPLEREGION = 2;
076:            int COMPLEXREGION = 3;
077:
078:            int CombineRgn(HRGN hrgnDest, HRGN hrgnSrc1, HRGN hrgnSrc2,
079:                    int fnCombineMode);
080:
081:            HRGN CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect,
082:                    int nBottomRect);
083:
084:            HRGN CreateRoundRectRgn(int nLeftRect, int nTopRect,
085:                    int nRightRect, int nBottomRect, int nWidthEllipse,
086:                    int nHeightEllipse);
087:
088:            boolean SetRectRgn(HRGN hrgn, int nLeftRect, int nTopRect,
089:                    int nRightRect, int nBottomRect);
090:
091:            int SetPixel(HDC hDC, int x, int y, int crColor);
092:
093:            HDC CreateCompatibleDC(HDC hDC);
094:
095:            boolean DeleteDC(HDC hDC);
096:
097:            int BI_RGB = 0;
098:            int BI_RLE8 = 1;
099:            int BI_RLE4 = 2;
100:            int BI_BITFIELDS = 3;
101:            int BI_JPEG = 4;
102:            int BI_PNG = 5;
103:
104:            public static class BITMAPINFOHEADER extends Structure {
105:                public int biSize = size();
106:                public int biWidth;
107:                public int biHeight;
108:                public short biPlanes;
109:                public short biBitCount;
110:                public int biCompression;
111:                public int biSizeImage;
112:                public int biXPelsPerMeter;
113:                public int biYPelsPerMeter;
114:                public int biClrUsed;
115:                public int biClrImportant;
116:            }
117:
118:            public static class RGBQUAD extends Structure {
119:                public byte rgbBlue;
120:                public byte rgbGreen;
121:                public byte rgbRed;
122:                public byte rgbReserved = 0;
123:            }
124:
125:            public static class BITMAPINFO extends Structure {
126:                public BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
127:                //RGBQUAD:
128:                //byte rgbBlue;
129:                //byte rgbGreen;
130:                //byte rgbRed;
131:                //byte rgbReserved = 0;
132:                int[] bmiColors = new int[1];
133:
134:                public BITMAPINFO() {
135:                    this (1);
136:                }
137:
138:                public BITMAPINFO(int size) {
139:                    bmiColors = new int[size];
140:                    allocateMemory();
141:                }
142:            }
143:
144:            int DIB_RGB_COLORS = 0;
145:            int DIB_PAL_COLORS = 1;
146:
147:            HBITMAP CreateDIBitmap(HDC hDC, BITMAPINFOHEADER lpbmih,
148:                    int fdwInit, Pointer lpbInit, BITMAPINFO lpbmi, int fuUsage);
149:
150:            HBITMAP CreateDIBSection(HDC hDC, BITMAPINFO pbmi, int iUsage,
151:                    PointerByReference ppvBits, Pointer hSection, int dwOffset);
152:
153:            HBITMAP CreateCompatibleBitmap(HDC hDC, int width, int height);
154:
155:            HANDLE SelectObject(HDC hDC, HANDLE hGDIObj);
156:
157:            boolean DeleteObject(HANDLE p);
158:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.