当前位置: 首页>>代码示例>>C++>>正文


C++ GetDisplay函数代码示例

本文整理汇总了C++中GetDisplay函数的典型用法代码示例。如果您正苦于以下问题:C++ GetDisplay函数的具体用法?C++ GetDisplay怎么用?C++ GetDisplay使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetDisplay函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetDisplay

void DDScreen::PrintText(int x, int y, const char* text)
{
    HFONT font = ::CreateFont
    (
        12,
        8,
        0,
        0,
        0,
        false,
        false,
        false,
        DEFAULT_CHARSET,
        OUT_DEFAULT_PRECIS,
        CLIP_DEFAULT_PRECIS,
        ANTIALIASED_QUALITY,
        FF_ROMAN,
        NULL
    );

    DDSurface *dest = GetDisplay().GetBackBuffer();
    
    TCHAR_string out = ToTCHAR(text);
    dest->DrawText(font, (TCHAR*)out.c_str(), x, y, 0L, 0xC0FF00);

    ::DeleteObject(font);
}
开发者ID:BackupTheBerlios,项目名称:utgs-svn,代码行数:27,代码来源:DDScreen.cpp

示例2: RemoveAllItems

void
JXDisplayMenu::BuildMenu()
{
	RemoveAllItems();

	JXApplication* app = JXGetApplication();
	const JSize count = app->GetDisplayCount();
	for (JIndex i=1; i<=count; i++)
		{
		JXDisplay* display = app->GetDisplay(i);
		AppendItem(display->GetName(), kRadioType);
		}

	ShowSeparatorAfter(count);
	AppendItem(kNewDisplayStr);
	itsNewDisplayIndex = count+1;

	SetUpdateAction(kDisableNone);

	const JBoolean found =
		(JXGetApplication())->GetDisplayIndex(GetDisplay(), &itsDisplayIndex);
	assert( found );

	ListenTo(this);
	ListenTo( (JXGetApplication())->GetDisplayList() );
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:26,代码来源:JXDisplayMenu.cpp

示例3: X11_ShowCursor

static int
X11_ShowCursor(SDL_Cursor * cursor)
{
    Cursor x11_cursor = 0;

    if (cursor) {
        x11_cursor = (Cursor)cursor->driverdata;
    } else {
        x11_cursor = X11_CreateEmptyCursor();
    }

    /* FIXME: Is there a better way than this? */
    {
        SDL_VideoDevice *video = SDL_GetVideoDevice();
        Display *display = GetDisplay();
        SDL_Window *window;
        SDL_WindowData *data;

        for (window = video->windows; window; window = window->next) {
            data = (SDL_WindowData *)window->driverdata;
            if (x11_cursor != None) {
                XDefineCursor(display, data->xwindow, x11_cursor);
            } else {
                XUndefineCursor(display, data->xwindow);
            }
        }
        XFlush(display);
    }
    return 0;
}
开发者ID:DarkWolk,项目名称:libsdl,代码行数:30,代码来源:SDL_x11mouse.c

示例4: X11_CreateXCursorCursor

static Cursor
X11_CreateXCursorCursor(SDL_Surface * surface, int hot_x, int hot_y)
{
    Display *display = GetDisplay();
    Cursor cursor = None;
    XcursorImage *image;

    image = XcursorImageCreate(surface->w, surface->h);
    if (!image) {
        SDL_OutOfMemory();
        return None;
    }
    image->xhot = hot_x;
    image->yhot = hot_y;
    image->delay = 0;

    SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888);
    SDL_assert(surface->pitch == surface->w * 4);
    SDL_memcpy(image->pixels, surface->pixels, surface->h * surface->pitch);

    cursor = XcursorImageLoadCursor(display, image);

    XcursorImageDestroy(image);

    return cursor;
}
开发者ID:DarkWolk,项目名称:libsdl,代码行数:26,代码来源:SDL_x11mouse.c

示例5: GetTableSelection

void
SVNPropertiesList::CopySelectedItems
	(
	const JBoolean fullPath
	)
{
	JTableSelection& s = GetTableSelection();
	if (!s.HasSelection())
		{
		return;
		}

	JPtrArray<JString> list(JPtrArrayT::kDeleteAll);
	JTableSelectionIterator iter(&s);
	JPoint cell;
	while (iter.Next(&cell))
		{
		list.Append(*((GetStringList()).NthElement(cell.y)));
		}

	JXTextSelection* data = new JXTextSelection(GetDisplay(), list);
	assert( data != NULL );

	(GetSelectionManager())->SetData(kJXClipboardName, data);
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:25,代码来源:SVNPropertiesList.cpp

示例6: JXTextSelection

void
ClipboardWidget::HandleEditMenu
	(
	const JIndex index
	)
{
	if (index == kCopyCmd)
		{
		// We instantiate a selection object that is appropriate for
		// our data. 
		JXTextSelection* data = new JXTextSelection(GetDisplay(), itsText);
		assert(data != NULL);

		// The selection data is then given to the selection manager.
		if (!(GetSelectionManager())->SetData(kJXClipboardName, data))
			{
			(JGetUserNotification())->ReportError("Unable to copy to the X Clipboard.");
			}
		}
	else if (index == kPasteCmd)
		{
		// Paste if the clipboard has the type we need.
		Paste();
		}
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:25,代码来源:ClipboardWidget.cpp

示例7: GetColormap

void
JXImageWidget::SetXPM
	(
	const JXPM&			data,
	const JColorIndex	origBackColor
	)
{
	const JColorIndex backColor =
		(origBackColor == kJXTransparentColor ?
		 GetColormap()->GetDefaultBackColor() : origBackColor);

	if (itsOwnsImageFlag)
		{
		jdelete itsImage;
		}

	itsImage = jnew JXImage(GetDisplay(), data);
	assert( itsImage != NULL );

	itsOwnsImageFlag = kJTrue;

	AdjustBounds();

	SetBackColor(backColor);
	Refresh();
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:26,代码来源:JXImageWidget.cpp

示例8: JXImage

void
JXImageButton::SetBitmap
	(
	const JConstBitmap&	bitmap,
	const JColorIndex	origForeColor,
	const JColorIndex	origBackColor
	)
{
	const JColorIndex foreColor =
		(origForeColor == kJXTransparentColor ?
		 (GetColormap())->GetBlackColor() : origForeColor);

	const JColorIndex backColor =
		(origBackColor == kJXTransparentColor ?
		 (GetColormap())->GetDefaultBackColor() : origBackColor);

	if (itsOwnsImageFlag)
		{
		delete itsImage;
		}

	itsImage = new JXImage(GetDisplay(), GetColormap(), bitmap, foreColor, backColor);
	assert( itsImage != NULL );

	itsOwnsImageFlag = kJTrue;

	SetBackColor(backColor);
	Refresh();
}
开发者ID:mbert,项目名称:mulberry-lib-jx,代码行数:29,代码来源:JXImageButton.cpp

示例9: X11_DestroyEmptyCursor

static void
X11_DestroyEmptyCursor(void)
{
    if (x11_empty_cursor != None) {
        X11_XFreeCursor(GetDisplay(), x11_empty_cursor);
        x11_empty_cursor = None;
    }
}
开发者ID:Daft-Freak,项目名称:vogl,代码行数:8,代码来源:SDL_x11mouse.c

示例10: JXWidget

JXTabGroup::JXTabGroup
	(
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXWidget(enclosure, hSizing, vSizing, x,y, w,h),
	itsEdge(kTop),
	itsFontName(JGetDefaultFontName()),
	itsFontSize(kJDefaultFontSize),
	itsCanScrollUpFlag(kJFalse),
	itsCanScrollDownFlag(kJFalse),
	itsFirstDrawIndex(1),
	itsLastDrawIndex(1),
	itsContextMenu(NULL),
	itsPrevTabIndex(0),
	itsDragAction(kInvalidClick),
	itsScrollUpPushedFlag(kJFalse),
	itsScrollDownPushedFlag(kJFalse),
	itsMouseIndex(0),
	itsClosePushedFlag(kJFalse)
{
	itsTitles = new JPtrArray<JString>(JPtrArrayT::kDeleteAll);
	assert( itsTitles != NULL );

	itsTabInfoList = new JArray<TabInfo>;
	assert( itsTabInfoList != NULL );

	itsCloseImage = new JXImage(GetDisplay(), jx_tab_close);
	assert( itsCloseImage != NULL );

	itsClosePushedImage = new JXImage(GetDisplay(), jx_tab_close_pushed);
	assert( itsClosePushedImage != NULL );

	itsTabRects = new JArray<JRect>;
	assert( itsTabRects != NULL );

	itsCardFile = new JXCardFile(this, kHElastic, kVElastic, 0,0, 100,100);
	assert( itsCardFile != NULL );
	PlaceCardFile();
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:46,代码来源:JXTabGroup.cpp

示例11: XCloseDisplay

void WindowData::CloseDisplay()
{
    if (display)
    {
        XCloseDisplay(GetDisplay());
        display = 0;
    }
}
开发者ID:Akranar,项目名称:daguerreo,代码行数:8,代码来源:WindowData_LINUX.cpp

示例12: JXEditTable

JXRowHeaderWidget::JXRowHeaderWidget
	(
	JXTable*			table,
	JXScrollbarSet*		scrollbarSet,
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXEditTable(1,w, NULL, enclosure, hSizing,vSizing, x,y, w,h)
{
	assert( table != NULL && scrollbarSet != NULL );

	itsTable = table;
	itsTable->SetRowHeader(this);
	ListenTo(itsTable);

	itsVScrollbar = scrollbarSet->GetVScrollbar();
	ListenTo(itsVScrollbar);

	itsTitles = NULL;

	itsAllowRowResizingFlag = kJFalse;
	itsMinRowHeight         = 1;
	itsHMarginWidth         = 2*kCellFrameWidth;
	itsMaxBcastWidth        = 0;

	itsDragType = kInvalidDrag;

	itsDragLineCursor    = JXGetDragHorizLineCursor(GetDisplay());
	itsDragAllLineCursor = JXGetDragAllHorizLineCursor(GetDisplay());

	SetColBorderInfo(0, (GetColormap())->GetBlackColor());

	// override JXEditTable

	WantInput(kJFalse);
	SetBackColor((GetColormap())->GetDefaultBackColor());

	AppendCols(1, GetApertureWidth());
	AdjustToTable();
}
开发者ID:dllaurence,项目名称:jx_application_framework,代码行数:46,代码来源:JXRowHeaderWidget.cpp

示例13: GetDisplay

void
TestWidget::PrintSelectionText
	(
	const Atom selectionName,
	const Time time,
	const Atom type
	)
	const
{
	JXDisplay* display         = GetDisplay();
	JXSelectionManager* selMgr = GetSelectionManager();

	Atom returnType;
	unsigned char* data;
	JSize dataLength;
	JXSelectionManager::DeleteMethod delMethod;
	if (selMgr->GetData(selectionName, time, type,
						&returnType, &data, &dataLength, &delMethod))
		{
		if (returnType == XA_STRING ||
			returnType == selMgr->GetUtf8StringXAtom() ||
			returnType == selMgr->GetMimePlainTextXAtom())
			{
			std::cout << "Data is available as " << XGetAtomName(*display, type) << ":" << std::endl << std::endl;

			std::cout.write((char*) data, dataLength);
			std::cout << std::endl << std::endl;
			}
		else
			{
			std::cout << "Data has unrecognized return type:  ";
			std::cout << XGetAtomName(*(GetDisplay()), returnType) << std::endl;
			std::cout << "Trying to print it anyway:" << std::endl << std::endl;

			std::cout.write((char*) data, dataLength);
			std::cout << std::endl << std::endl;
			}

		selMgr->DeleteData(&data, delMethod);
		}
	else
		{
		std::cout << "Data could not be retrieved as " << XGetAtomName(*display, type) << "." << std::endl << std::endl;
		}
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:45,代码来源:TestWidget.cpp

示例14: JXEditTable

JXColHeaderWidget::JXColHeaderWidget
	(
	JXTable*			table,
	JXScrollbarSet*		scrollbarSet,
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXEditTable(h,1, NULL, enclosure, hSizing,vSizing, x,y, w,h)
{
	assert( table != NULL && scrollbarSet != NULL );

	itsTable = table;
	itsTable->SetColHeader(this);
	ListenTo(itsTable);

	itsHScrollbar = scrollbarSet->GetHScrollbar();
	ListenTo(itsHScrollbar);

	itsTitles = NULL;

	itsAllowColResizingFlag = kJFalse;
	itsMinColWidth          = 1;

	itsDragType = kInvalidDrag;

	itsDragLineCursor    = JXGetDragVertLineCursor(GetDisplay());
	itsDragAllLineCursor = JXGetDragAllVertLineCursor(GetDisplay());

	SetDrawOrder(kDrawByRow);
	SetRowBorderInfo(0, (GetColormap())->GetBlackColor());

	// override JXEditTable

	WantInput(kJFalse);
	SetBackColor((GetColormap())->GetDefaultBackColor());

	AppendRows(1, GetApertureHeight());
	AdjustToTable();
}
开发者ID:mbert,项目名称:mulberry-lib-jx,代码行数:45,代码来源:JXColHeaderWidget.cpp

示例15: X11_WarpMouseGlobal

static int
X11_WarpMouseGlobal(int x, int y)
{
    Display *display = GetDisplay();

    X11_XWarpPointer(display, None, DefaultRootWindow(display), 0, 0, 0, 0, x, y);
    X11_XSync(display, False);
    return 0;
}
开发者ID:03050903,项目名称:Torque3D,代码行数:9,代码来源:SDL_x11mouse.c


注:本文中的GetDisplay函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。