コード例 #1
0
// Return true if region contains point
FXbool FXRegion::contains(FXint x,FXint y) const {
#ifdef WIN32
  return region && PtInRegion((HRGN)region,x,y);
#else
  return XPointInRegion((Region)region,x,y);
#endif
  }
コード例 #2
0
ファイル: regionobject.c プロジェクト: sk1project/skencil
static PyObject *
region_PointInRegion(PaxRegionObject *self, PyObject *args)
{
    int x, y;
    if (!PyArg_ParseTuple(args, "ii", &x, &y))
	return NULL;
    return PyInt_FromLong(XPointInRegion(self->region, x, y));
}
コード例 #3
0
ファイル: DrvRegions.c プロジェクト: ErisBlastar/osfree
/* lpStruct - pointer to POINT */
DWORD
DrvRegionsPtInRegion(LPARAM dwParm1, LPARAM dwParm2, LPVOID lpStruct)
{
	LPPOINT lppt;

	if (!(lppt = (LPPOINT)lpStruct))
		return (DWORD)FALSE;
	return (DWORD)XPointInRegion((Region)dwParm1, lppt->x, lppt->y);
}
コード例 #4
0
EAPI Eina_Bool
ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y)
{
   if (!region)
      return EINA_FALSE;

   LOGFN(__FILE__, __LINE__, __FUNCTION__);
   return XPointInRegion((Region)region, x, y) ? EINA_TRUE : EINA_FALSE;
} /* ecore_x_xregion_point_contain */
コード例 #5
0
wxRegionContain wxRegion::DoContainsPoint( wxCoord x, wxCoord y ) const
{
    if (!m_refData)
        return wxOutRegion;

    if (XPointInRegion( M_REGIONDATA->m_region, x, y ))
        return wxInRegion;
    else
        return wxOutRegion;
}
コード例 #6
0
wxRegionContain wxRegion::Contains( wxCoord x, wxCoord y ) const
{
    if (!m_refData)
        return wxOutRegion;

#if 0
    if (XPointInRegion( M_REGIONDATA->m_region, x, y ))
        return wxInRegion;
    else
        return wxOutRegion;
#endif
}
コード例 #7
0
ファイル: gfdrgkor.c プロジェクト: oeli/yafra
long xGRfind_region_koord(
int x,
int y
)
{
	extern REGOBJ *regObj;
	extern long anzregObj;

	REGOBJ *akt;
	long z;

	for (z=0; z<anzregObj; z++) {
		akt = &regObj[z];
		if (akt->region) {
			if (XPointInRegion(akt->region, x, y)) {
				return(z);
			}
		}
	}
	return(NOVATER);
}
コード例 #8
0
bool X11Graphics::hit( int x, int y ) const
{
    return XPointInRegion( m_mask, x, y );
}
コード例 #9
0
ファイル: region.cpp プロジェクト: squarehimself/XMoniz
bool
CompRegion::contains (const CompPoint &p) const
{
    return XPointInRegion (handle (), p.x (), p.y ());
}
コード例 #10
0
ファイル: apc_region.c プロジェクト: dk/Prima
Bool
apc_region_point_inside( Handle self, Point p)
{
	return XPointInRegion( REGION, p.x, HEIGHT - p.y - 1);
}
コード例 #11
0
ファイル: group-group.c プロジェクト: noodlylight/fusilli
/*
 * groupHandleButtonPressEvent
 *
 */
static void
groupHandleButtonPressEvent (CompScreen *s,
                             XEvent     *event)
{
	GroupSelection *group;
	int xRoot, yRoot, button;

	GROUP_SCREEN (s);

	xRoot  = event->xbutton.x_root;
	yRoot  = event->xbutton.y_root;
	button = event->xbutton.button;

	for (group = gs->groups; group; group = group->next)
	{
		if (group->inputPrevention != event->xbutton.window)
			continue;

		if (!group->tabBar)
			continue;

		switch (button) {
		case Button1:
		{
			GroupTabBarSlot *slot;

			for (slot = group->tabBar->slots; slot; slot = slot->next)
			{
				if (XPointInRegion (slot->region, xRoot, yRoot))
				{
					gs->draggedSlot = slot;
					/* The slot isn't dragged yet */
					gs->dragged = FALSE;
					gs->prevX = xRoot;
					gs->prevY = yRoot;

					if (!otherScreenGrabExist (s, "group", "group-drag", NULL))
						groupGrabScreen (s, ScreenGrabTabDrag);
				}
			}
		}
		break;

		case Button4:
		case Button5:
		{
			CompWindow  *topTab = NULL;
			GroupWindow *gw;

			if (group->nextTopTab)
				topTab = NEXT_TOP_TAB (group);
			else if (group->topTab)
			{
				/* If there are no tabbing animations,
				   topTab is never NULL. */
				topTab = TOP_TAB (group);
			}

			if (!topTab)
				return;

			gw = GET_GROUP_WINDOW (topTab, gs);

			if (button == Button4)
			{
				if (gw->slot->prev)
					groupChangeTab (gw->slot->prev, RotateLeft);
				else
					groupChangeTab (gw->group->tabBar->revSlots,
					                RotateLeft);
			}
			else
			{
				if (gw->slot->next)
					groupChangeTab (gw->slot->next, RotateRight);
				else
					groupChangeTab (gw->group->tabBar->slots, RotateRight);
			}
			break;
		}
		}

		break;
	}
}