-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More work on the windowing system, added new elements, updated layout…
… and more details on the accessbar.
- Loading branch information
1 parent
933371c
commit 3c32ee9
Showing
37 changed files
with
643 additions
and
149 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* MollenOS | ||
* | ||
* Copyright 2018, Philip Meulengracht | ||
* | ||
* This program is free software : you can redistribute it and / or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation ? , either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program.If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* | ||
* MollenOS Service - Session Manager | ||
* - Contains the implementation of the session-manager which keeps track | ||
* of all users and their running applications. | ||
*/ | ||
|
||
#ifndef __PROCESS_INTERFACE__ | ||
#define __PROCESS_INTERFACE__ | ||
|
||
#include <os/osdefs.h> | ||
|
||
typedef struct _SystemProcess { | ||
UUId_t MainThread; | ||
UUId_t Id; | ||
|
||
const char* Name; | ||
const char* Path; | ||
UUId_t MemorySpace; | ||
|
||
// Below is everything related to | ||
// the startup and the executable information | ||
// that the Ash has | ||
void* Executable; | ||
uintptr_t NextLoadingAddress; | ||
uint8_t* FileBuffer; | ||
size_t FileBufferLength; | ||
int Code; | ||
} SystemProcess_t; | ||
|
||
|
||
|
||
|
||
#endif //!__PROCESS_INTERFACE__ |
Submodule nanovg
updated
5 files
+3 −0 | src/nanovg.c | |
+1 −0 | src/nanovg.h | |
+21 −3 | src/nanovg_gl.h | |
+1,540 −692 | src/stb_image.h | |
+1,719 −115 | src/stb_truetype.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* MollenOS | ||
* | ||
* Copyright 2011 - 2018, Philip Meulengracht | ||
* | ||
* This program is free software : you can redistribute it and / or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation ? , either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program.If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* | ||
* MollenOS - Vioarr Window Compositor System | ||
* - The window compositor system and general window manager for | ||
* MollenOS. | ||
*/ | ||
#include "accessbar_widget.hpp" | ||
#include "accessbar.hpp" | ||
#include "sprite.hpp" | ||
|
||
// Dummy - do nothing callback | ||
void WidgetDummyCallback(CEntity* Entity) {} | ||
|
||
CAccessBarWidget::CAccessBarWidget(CEntity* Parent, NVGcontext* VgContext, int Width, int Height) | ||
: CEntity(Parent, VgContext), m_Entity(nullptr), m_Callback(WidgetDummyCallback), m_Text("Widget") | ||
{ | ||
m_Width = Width; | ||
m_Height = Height; | ||
} | ||
|
||
CAccessBarWidget::CAccessBarWidget(NVGcontext* VgContext, int Width, int Height) | ||
: CAccessBarWidget(nullptr, VgContext, Width, Height) { } | ||
|
||
CAccessBarWidget::~CAccessBarWidget() { | ||
} | ||
|
||
void CAccessBarWidget::SetWidgetText(std::string& Text) | ||
{ | ||
m_Text = Text; | ||
} | ||
|
||
void CAccessBarWidget::SetWidgetIcon(std::string& IconPath) | ||
{ | ||
auto Icon = new CSprite(m_VgContext, IconPath, 16, 16); | ||
float x = (m_Width - 16) - 4; // Position to the right, with margin 4 pixels | ||
float y = ((m_Height - 16) / 2.0f); // Position in the vertical middle | ||
|
||
Icon->Move(x, y, 0.0f); | ||
this->AddEntity(Icon); | ||
} | ||
|
||
void CAccessBarWidget::SetWidgetEntity(CEntity* Entity) | ||
{ | ||
m_Entity = Entity; | ||
} | ||
|
||
void CAccessBarWidget::SetWidgetFunction(std::function<void(CEntity*)>& Function) | ||
{ | ||
m_Callback = Function; | ||
} | ||
|
||
void CAccessBarWidget::Update(size_t MilliSeconds) { | ||
} | ||
|
||
void CAccessBarWidget::Draw(NVGcontext* VgContext) { | ||
// Draw border | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* MollenOS | ||
* | ||
* Copyright 2011 - 2018, Philip Meulengracht | ||
* | ||
* This program is free software : you can redistribute it and / or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation ? , either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program.If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* | ||
* MollenOS - Vioarr Window Compositor System | ||
* - The window compositor system and general window manager for | ||
* MollenOS. | ||
*/ | ||
#pragma once | ||
#include "../entity.hpp" | ||
#include <functional> | ||
#include <string> | ||
|
||
class CAccessBarWidget : public CEntity { | ||
public: | ||
CAccessBarWidget(CEntity* Parent, NVGcontext* VgContext, int Width, int Height); | ||
CAccessBarWidget(NVGcontext* VgContext, int Width, int Height); | ||
~CAccessBarWidget(); | ||
|
||
void SetWidgetText(std::string& Text); | ||
void SetWidgetIcon(std::string& IconPath); | ||
void SetWidgetEntity(CEntity* Entity); | ||
void SetWidgetFunction(std::function<void(CEntity*)>& Function); | ||
|
||
protected: | ||
// Override the inherited methods | ||
void Update(size_t MilliSeconds); | ||
void Draw(NVGcontext* VgContext); | ||
|
||
private: | ||
int m_Width; | ||
int m_Height; | ||
CEntity* m_Entity; | ||
std::function<void(CEntity*)> m_Callback; | ||
std::string m_Text; | ||
}; |
Oops, something went wrong.