本文整理汇总了C++中workspace函数的典型用法代码示例。如果您正苦于以下问题:C++ workspace函数的具体用法?C++ workspace怎么用?C++ workspace使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了workspace函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QTimer
void Client::demandAttention( bool set )
{
if( isActive())
set = false;
if( demands_attention == set )
return;
demands_attention = set;
if( demands_attention )
{
// Demand attention flag is often set right from manage(), when focus stealing prevention
// steps in. At that time the window has no taskbar entry yet, so KNotify cannot place
// e.g. the passive popup next to it. So wait up to 1 second for the icon geometry
// to be set.
// Delayed call to KNotify also solves the problem of having X server grab in manage(),
// which may deadlock when KNotify (or KLauncher when launching KNotify) need to access X.
// Setting the demands attention state needs to be done directly in KWin, because
// KNotify would try to set it, resulting in a call to KNotify again, etc.
info->setState( set ? NET::DemandsAttention : 0, NET::DemandsAttention );
if( demandAttentionKNotifyTimer == NULL )
{
demandAttentionKNotifyTimer = new QTimer( this );
demandAttentionKNotifyTimer->setSingleShot( true );
connect( demandAttentionKNotifyTimer, SIGNAL( timeout()), SLOT( demandAttentionKNotify()));
}
demandAttentionKNotifyTimer->start( 1000 );
}
else
info->setState( set ? NET::DemandsAttention : 0, NET::DemandsAttention );
workspace()->clientAttentionChanged( this, set );
}
示例2: main
int main()
{
Flexlay flexlay;
flexlay.init();
Editor editor;
GUIManager* gui = editor.get_gui_manager();
new CL_Button(CL_Rect(CL_Point(50, 50),
CL_Size(100, 25)),
"Hello World", gui->get_component());
EditorMap m;
Tileset tileset(32);
TilemapLayer tilemap(tileset, 20, 10);
m.add_layer(tilemap.to_layer());
TilemapLayer::set_current(tilemap);
EditorMapComponent editor_map(CL_Rect(0, 0, 799, 599), gui->get_component());
Workspace workspace(799, 599);
editor_map.set_workspace(workspace);
workspace.set_map(m);
new CL_Button(CL_Rect(CL_Point(50, 150),
CL_Size(100, 25)),
"Quit", gui->get_component());
gui->run();
flexlay.deinit();
}
示例3: invoke
static std::ptrdiff_t invoke( const char jobz, MatrixAB& ab, VectorW& w,
MatrixZ& z, minimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
bindings::detail::array< real_type > tmp_work( min_size_work(
bindings::size_column(ab) ) );
return invoke( jobz, ab, w, z, workspace( tmp_work ) );
}
示例4: invoke
static std::ptrdiff_t invoke( const char norm, const MatrixAP& ap,
minimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
bindings::detail::array< real_type > tmp_work( min_size_work( norm,
bindings::size_column(ap) ) );
return invoke( norm, ap, workspace( tmp_work ) );
}
示例5: invoke
static std::ptrdiff_t invoke( const fortran_int_t n,
const fortran_int_t ilo, const fortran_int_t ihi,
MatrixA& a, const VectorTAU& tau, minimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
bindings::detail::array< real_type > tmp_work( min_size_work( ihi,
ilo ) );
return invoke( n, ilo, ihi, a, tau, workspace( tmp_work ) );
}
示例6: invoke
static void invoke( integer_t const n, MatrixAP& ap, MatrixAFP& afp,
VectorIPIV& ipiv, MatrixB& b, MatrixX& x, VectorFERR& ferr,
VectorBERR& berr, integer_t& info, minimal_workspace work ) {
traits::detail::array< value_type > tmp_work( min_size_work( n ) );
traits::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
invoke( n, ap, afp, ipiv, b, x, ferr, berr, info, workspace( tmp_work,
tmp_rwork ) );
}
示例7: invoke
static void invoke( char const jobz, MatrixA& a, VectorW& w,
integer_t& info, minimal_workspace work ) {
traits::detail::array< real_type > tmp_work( min_size_work( jobz,
traits::matrix_num_columns(a) ) );
traits::detail::array< integer_t > tmp_iwork( min_size_iwork( jobz,
traits::matrix_num_columns(a) ) );
invoke( jobz, a, w, info, workspace( tmp_work, tmp_iwork ) );
}
示例8: invoke
static std::ptrdiff_t invoke( const fortran_int_t n, VectorX& x,
real_type& est, fortran_int_t& kase, minimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
bindings::detail::array< real_type > tmp_v( min_size_v( n ) );
bindings::detail::array<
fortran_int_t > tmp_isgn( min_size_isgn( n ) );
return invoke( n, x, est, kase, workspace( tmp_v, tmp_isgn ) );
}
示例9: invoke
static std::ptrdiff_t invoke( const MatrixAP& ap, const VectorIPIV& ipiv,
const real_type anorm, real_type& rcond, minimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
bindings::detail::array< value_type > tmp_work( min_size_work(
bindings::size_column(ap) ) );
return invoke( ap, ipiv, anorm, rcond, workspace( tmp_work ) );
}
示例10: invoke
static void invoke( char const compz, integer_t const n, VectorD& d,
VectorE& e, MatrixZ& z, integer_t& info, minimal_workspace work ) {
traits::detail::array< real_type > tmp_work( min_size_work(
$CALL_MIN_SIZE ) );
traits::detail::array< integer_t > tmp_iwork( min_size_iwork( compz,
n ) );
invoke( compz, n, d, e, z, info, workspace( tmp_work, tmp_iwork ) );
}
示例11: kError
Deleted::~Deleted()
{
if (delete_refcount != 0)
kError(1212) << "Deleted client has non-zero reference count (" << delete_refcount << ")";
assert(delete_refcount == 0);
workspace()->removeDeleted(this);
deleteEffectWindow();
}
示例12: invoke
static void invoke( char const job, integer_t const n, MatrixA& a,
MatrixB& b, integer_t& ilo, integer_t& ihi, VectorLSCALE& lscale,
VectorRSCALE& rscale, integer_t& info, minimal_workspace work ) {
traits::detail::array< real_type > tmp_work( min_size_work(
$CALL_MIN_SIZE ) );
invoke( job, n, a, b, ilo, ihi, lscale, rscale, info,
workspace( tmp_work ) );
}
示例13: _WorkspaceAt
void
WorkspacesView::_DrawWorkspace(DrawingEngine* drawingEngine,
BRegion& redraw, int32 index)
{
BRect rect = _WorkspaceAt(index);
Workspace workspace(*Window()->Desktop(), index);
bool active = workspace.IsCurrent();
if (active) {
// draw active frame
rgb_color black = (rgb_color){ 0, 0, 0, 255 };
drawingEngine->StrokeRect(rect, black);
} else if (index == fSelectedWorkspace) {
rgb_color gray = (rgb_color){ 80, 80, 80, 255 };
drawingEngine->StrokeRect(rect, gray);
}
rect.InsetBy(1, 1);
rgb_color color = workspace.Color();
if (!active)
_DarkenColor(color);
// draw windows
BRegion backgroundRegion = redraw;
// TODO: would be nice to get the real update region here
BRect screenFrame = _ScreenFrame(index);
BRegion workspaceRegion(rect);
backgroundRegion.IntersectWith(&workspaceRegion);
drawingEngine->ConstrainClippingRegion(&backgroundRegion);
ServerFont font = fDrawState->Font();
font.SetSize(fWindow->ServerWindow()->App()->PlainFont().Size());
float reducedSize = ceilf(max_c(8.0f,
min_c(Frame().Height(), Frame().Width()) / 15));
if (font.Size() > reducedSize)
font.SetSize(reducedSize);
fDrawState->SetFont(font);
drawingEngine->SetFont(font);
// We draw from top down and cut the window out of the clipping region
// which reduces the flickering
::Window* window;
BPoint leftTop;
while (workspace.GetPreviousWindow(window, leftTop) == B_OK) {
_DrawWindow(drawingEngine, rect, screenFrame, window,
leftTop, backgroundRegion, active);
}
// draw background
drawingEngine->FillRect(rect, color);
drawingEngine->ConstrainClippingRegion(&redraw);
}
示例14: invoke
static std::ptrdiff_t invoke( const char jobz, const fortran_int_t n,
VectorD& d, VectorE& e, MatrixZ& z, minimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
bindings::detail::array< real_type > tmp_work( min_size_work( jobz,
n ) );
bindings::detail::array< fortran_int_t > tmp_iwork(
min_size_iwork( jobz, n ) );
return invoke( jobz, n, d, e, z, workspace( tmp_work, tmp_iwork ) );
}
示例15: invoke
static std::ptrdiff_t invoke( const Side side, const MatrixA& a,
const VectorTAU& tau, MatrixC& c, minimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
typedef typename result_of::data_order< MatrixC >::type order;
typedef typename result_of::trans_tag< MatrixA, order >::type trans;
bindings::detail::array< real_type > tmp_work( min_size_work( side,
bindings::size_row(c), bindings::size_column(c) ) );
return invoke( side, a, tau, c, workspace( tmp_work ) );
}