Code Search for Developers
 
 
  

swt_awt.c from MASE: Agile Software Engineering at Krugle


Show swt_awt.c syntax highlighted

/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* 
* Contributors:
*     IBM Corporation - initial API and implementation
*******************************************************************************/

#include "jawt_md.h"

#define SWT_AWT_NATIVE(func) Java_org_eclipse_swt_awt_SWT_1AWT_##func

#ifndef NO_getAWTHandle
JNIEXPORT jint JNICALL SWT_AWT_NATIVE(getAWTHandle)
	(JNIEnv *env, jclass that, jobject canvas)
{
	JAWT awt;
	JAWT_DrawingSurface* ds;
	JAWT_DrawingSurfaceInfo* dsi;
	JAWT_Win32DrawingSurfaceInfo* dsi_win;
	jint result = 0;
	jint lock;

	awt.version = JAWT_VERSION_1_3;
	if (JAWT_GetAWT(env, &awt) != 0) {
		ds = awt.GetDrawingSurface(env, canvas);
		if (ds != NULL) {
			lock = ds->Lock(ds);
		 	if ((lock & JAWT_LOCK_ERROR) == 0) {
			 	dsi = ds->GetDrawingSurfaceInfo(ds);
				dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
				result = (jint)dsi_win->hwnd;
				ds->FreeDrawingSurfaceInfo(dsi);
				ds->Unlock(ds);
			}
		}
		awt.FreeDrawingSurface(ds);
	}
	return result;
}
#endif




See more files for this project here

MASE: Agile Software Engineering

The MASE project investigates methods to support the coordination and executable acceptance testing of software projects. Keywords: Agile methods, distributed teams, Extreme Programming. See http://ebe.cpsc.ucalgary.ca/ebe for more information.

Project homepage: http://sourceforge.net/projects/mase
Programming language(s): Java,XML
License: other

  .settings/
    org.eclipse.jdt.core.prefs
    org.eclipse.jdt.ui.prefs
  about_files/
    IJG_README
  ebe/
    manymouse/
      cursor/
        DetectMice.java
        MouseCursor.java
        MouseCursorData.java
        ReadMiceData.java
        mouse.gif
      events/
        HandleMiceEvents.java
      jni/
        ManyMouse.java
        ManyMouseEvent.java
      test/
        TestManyMouse.java
      utils/
        MouseUtils.java
        hidden_mouse.gif
      MultipleMice.java
    test/
      GuiTest.java
      ListenerTest.java
      MultipleMouseDemo.java
      SendSystemEvents.java
      Snippet110.java
      Snippet118.java
      Snippet119.java
      Snippet142.java
      Snippet146.java
      Snippet219.java
      Snippet242.java
      Snippet44.java
      Snippet46.java
      Snippet92.java
      SwtSample.java
      TestGui.java
  org/
    eclipse/
  .classpath
  .project
  ManyMouseJava.c
  ManyMouseJava.dll
  ManyMouseJava.exp
  ManyMouseJava.h
  ManyMouseJava.lib
  ManyMouse_LICENSE
  ManyMouse_README
  Manymouse_Makefile
  about.html
  build-ce.bat
  build.bat
  build.xml
  callback.c
  callback.h
  com.c
  com.h
  com_custom.h
  com_stats.c
  com_stats.h
  com_structs.c
  com_structs.h
  defines.h
  gdip.cpp
  gdip.h
  gdip_custom.cpp
  gdip_stats.cpp
  gdip_stats.h
  gdip_structs.cpp
  gdip_structs.h
  javaw.exe.manifest
  linux_evdev.c
  linux_evdev.dll
  macosx_hidmanager.c
  macosx_hidmanager.dll
  make_common.mak
  make_win32.mak
  make_wince.mak
  manymouse.c
  manymouse.dll
  manymouse.h
  os.c
  os.h
  os_custom.c
  os_custom.h
  os_stats.c
  os_stats.h
  os_structs.c
  os_structs.h
  swt-awt-win32-3232.dll
  swt-gdip-win32-3232.dll
  swt-wgl-win32-3232.dll
  swt-win32-3232.dll
  swt.c
  swt.h
  swt.rc
  swt_awt.c
  swt_awt.rc
  swt_gdip.rc
  swt_wgl.rc
  version.txt
  wgl.c
  wgl.h
  wgl_stats.c
  wgl_stats.h
  wgl_structs.c
  wgl_structs.h
  windows_wminput.c
  windows_wminput.dll
  x11_xinput.c
  x11_xinput.dll